|
39 | 39 | */
|
40 | 40 | typedef enum
|
41 | 41 | {
|
42 |
| - PARSER_IS_STRICT = (1u << 0), /**< strict mode code */ |
43 |
| - PARSER_IS_FUNCTION = (1u << 1), /**< function body is parsed */ |
44 |
| - PARSER_IS_CLOSURE = (1u << 2), /**< function body is encapsulated in {} block */ |
45 |
| - PARSER_IS_FUNC_EXPRESSION = (1u << 3), /**< a function expression is parsed */ |
46 |
| - PARSER_IS_PROPERTY_GETTER = (1u << 4), /**< a property getter function is parsed */ |
47 |
| - PARSER_IS_PROPERTY_SETTER = (1u << 5), /**< a property setter function is parsed */ |
48 |
| - PARSER_HAS_NON_STRICT_ARG = (1u << 7), /**< the function has arguments which |
49 |
| - * are not supported in strict mode */ |
50 |
| - PARSER_ARGUMENTS_NEEDED = (1u << 8), /**< arguments object must be created */ |
51 |
| - PARSER_ARGUMENTS_NOT_NEEDED = (1u << 9), /**< arguments object must NOT be created */ |
52 |
| - PARSER_LEXICAL_ENV_NEEDED = (1u << 10), /**< lexical environment object must be created */ |
53 |
| - PARSER_NO_REG_STORE = (1u << 11), /**< all local variables must be stored |
54 |
| - * in the lexical environment object */ |
55 |
| - PARSER_INSIDE_WITH = (1u << 12), /**< code block is inside a with statement */ |
56 |
| - PARSER_RESOLVE_BASE_FOR_CALLS = (1u << 13), /**< the this object must be resolved when |
57 |
| - * a function without a base object is called */ |
58 |
| - PARSER_HAS_INITIALIZED_VARS = (1u << 14), /**< a CBC_INITIALIZE_VARS instruction must be emitted */ |
59 |
| - PARSER_HAS_LATE_LIT_INIT = (1u << 15), /**< allocate memory for this string after |
60 |
| - * the local parser data is freed */ |
61 |
| - PARSER_NO_END_LABEL = (1u << 16), /**< return instruction must be inserted |
62 |
| - * after the last byte code */ |
63 |
| - PARSER_DEBUGGER_BREAKPOINT_APPENDED = (1u << 17), /**< pending (unsent) breakpoint |
64 |
| - * info is available */ |
| 42 | + PARSER_IS_STRICT = (1u << 0), /**< strict mode code */ |
| 43 | + PARSER_IS_FUNCTION = (1u << 1), /**< function body is parsed */ |
| 44 | + PARSER_IS_CLOSURE = (1u << 2), /**< function body is encapsulated in {} block */ |
| 45 | + PARSER_IS_FUNC_EXPRESSION = (1u << 3), /**< a function expression is parsed */ |
| 46 | + PARSER_IS_PROPERTY_GETTER = (1u << 4), /**< a property getter function is parsed */ |
| 47 | + PARSER_IS_PROPERTY_SETTER = (1u << 5), /**< a property setter function is parsed */ |
| 48 | + PARSER_HAS_NON_STRICT_ARG = (1u << 7), /**< the function has arguments which |
| 49 | + * are not supported in strict mode */ |
| 50 | + PARSER_ARGUMENTS_NEEDED = (1u << 8), /**< arguments object must be created */ |
| 51 | + PARSER_ARGUMENTS_NOT_NEEDED = (1u << 9), /**< arguments object must NOT be created */ |
| 52 | + PARSER_LEXICAL_ENV_NEEDED = (1u << 10), /**< lexical environment object must be created */ |
| 53 | + PARSER_NO_REG_STORE = (1u << 11), /**< all local variables must be stored |
| 54 | + * in the lexical environment object */ |
| 55 | + PARSER_INSIDE_WITH = (1u << 12), /**< code block is inside a with statement */ |
| 56 | + PARSER_RESOLVE_BASE_FOR_CALLS = (1u << 13), /**< the this object must be resolved when |
| 57 | + * a function without a base object is called */ |
| 58 | + PARSER_HAS_INITIALIZED_VARS = (1u << 14), /**< a CBC_INITIALIZE_VARS instruction must be emitted */ |
| 59 | + PARSER_HAS_LATE_LIT_INIT = (1u << 15), /**< allocate memory for this string after |
| 60 | + * the local parser data is freed */ |
| 61 | + PARSER_NO_END_LABEL = (1u << 16), /**< return instruction must be inserted |
| 62 | + * after the last byte code */ |
| 63 | + PARSER_DEBUGGER_BREAKPOINT_APPENDED = (1u << 17), /**< pending (unsent) breakpoint |
| 64 | + * info is available */ |
65 | 65 | #ifndef CONFIG_DISABLE_ES2015_ARROW_FUNCTION
|
66 |
| - PARSER_IS_ARROW_FUNCTION = (1u << 18), /**< an arrow function is parsed */ |
67 |
| - PARSER_ARROW_PARSE_ARGS = (1u << 19), /**< parse the argument list of an arrow function */ |
| 66 | + PARSER_IS_ARROW_FUNCTION = (1u << 18), /**< an arrow function is parsed */ |
| 67 | + PARSER_ARROW_PARSE_ARGS = (1u << 19), /**< parse the argument list of an arrow function */ |
68 | 68 | #endif /* !CONFIG_DISABLE_ES2015_ARROW_FUNCTION */
|
69 | 69 | #ifndef CONFIG_DISABLE_ES2015_CLASS
|
70 | 70 | /* These three status flags must be in this order. See PARSER_CLASS_PARSE_OPTS_OFFSET. */
|
71 |
| - PARSER_CLASS_CONSTRUCTOR = (1u << 20), /**< a class constructor is parsed (this value must be kept in |
72 |
| - * in sync with ECMA_PARSE_CLASS_CONSTRUCTOR) */ |
73 |
| - PARSER_CLASS_HAS_SUPER = (1u << 21), /**< class has super reference */ |
74 |
| - PARSER_CLASS_STATIC_FUNCTION = (1u << 22), /**< this function is a static class method */ |
75 |
| - PARSER_CLASS_SUPER_PROP_REFERENCE = (1u << 23), /**< super property call or assignment */ |
| 71 | + PARSER_CLASS_CONSTRUCTOR = (1u << 20), /**< a class constructor is parsed (this value must be kept in |
| 72 | + * in sync with ECMA_PARSE_CLASS_CONSTRUCTOR) */ |
| 73 | + PARSER_CLASS_HAS_SUPER = (1u << 21), /**< class has super reference */ |
| 74 | + PARSER_CLASS_STATIC_FUNCTION = (1u << 22), /**< this function is a static class method */ |
| 75 | + PARSER_CLASS_SUPER_PROP_REFERENCE = (1u << 23), /**< super property call or assignment */ |
| 76 | + PARSER_CLASS_EXTENDS_EXPR = PARSER_IS_FUNC_EXPRESSION /**< class extends expression is parsed */ |
76 | 77 | #endif /* !CONFIG_DISABLE_ES2015_CLASS */
|
77 | 78 | } parser_general_flags_t;
|
78 | 79 |
|
|
0 commit comments