@@ -55,24 +55,22 @@ typedef enum
5555 used by the byte code generator. */
5656} lexer_literal_type_t ;
5757
58- /* Flags for status_flags. */
59-
60- /** Local identifier (var, function arg). */
61- #define LEXER_FLAG_VAR 0x01
62- /** This local identifier cannot be stored in register. */
63- #define LEXER_FLAG_NO_REG_STORE 0x02
64- /** This local identifier is initialized with a value. */
65- #define LEXER_FLAG_INITIALIZED 0x04
66- /** This local identifier has a reference to the function itself. */
67- #define LEXER_FLAG_FUNCTION_NAME 0x08
68- /** This local identifier is a function argument. */
69- #define LEXER_FLAG_FUNCTION_ARGUMENT 0x10
70- /** This local identifier is not used in the current context. */
71- #define LEXER_FLAG_UNUSED_IDENT 0x20
72- /** No space is allocated for this character literal. */
73- #define LEXER_FLAG_SOURCE_PTR 0x40
74- /** Initialize this variable after the byte code is freed. */
75- #define LEXER_FLAG_LATE_INIT 0x80
58+ /**
59+ * Flag bits for status_flags member of lexer_literal_t.
60+ */
61+ typedef enum
62+ {
63+ LEXER_FLAG_VAR = (1 << 0 ), /**< local identifier (var, function arg) */
64+ LEXER_FLAG_NO_REG_STORE = (1 << 1 ), /**< this local identifier cannot be stored in register */
65+ LEXER_FLAG_INITIALIZED = (1 << 2 ), /**< this local identifier is initialized with a value */
66+ LEXER_FLAG_FUNCTION_NAME = (1 << 3 ), /**< this local identifier has a reference to the function itself */
67+ LEXER_FLAG_FUNCTION_ARGUMENT = (1 << 4 ), /**< this local identifier is a function argument */
68+ LEXER_FLAG_UNUSED_IDENT = (1 << 5 ), /**< this identifier is referenced by sub-functions,
69+ * but not referenced by the currently parsed function */
70+ LEXER_FLAG_SOURCE_PTR = (1 << 6 ), /**< the literal is directly referenced in the source code
71+ * (no need to allocate memory) */
72+ LEXER_FLAG_LATE_INIT = (1 << 7 ), /**< initialize this variable after the byte code is freed */
73+ } parser_lexer_literal_status_flags_t ;
7674
7775/**
7876 * Type of property length.
0 commit comments