Improve lexer_expect_object_literal_id option handling (#2436)
This patch allows to add further options flags to `lexer_expect_object_literal_id` to handle unique behaviors more easily also substitutes `PARSER_IS_CLASS` flag hence it is removed. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
committed by
László Langó
parent
8482fef41a
commit
a6ace5efdf
@@ -208,6 +208,17 @@ typedef enum
|
||||
LEXER_NO_SKIP_SPACES = (1u << 1) /**< ignore skip spaces */
|
||||
} lexer_newline_flags_t;
|
||||
|
||||
/**
|
||||
* Lexer object identifier parse options.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
LEXER_OBJ_IDENT_NO_OPTS = (1u << 0), /**< no options */
|
||||
LEXER_OBJ_IDENT_ONLY_IDENTIFIERS = (1u << 1), /**< only identifiers are accepted */
|
||||
LEXER_OBJ_IDENT_CLASS_METHOD = (1u << 2), /**< expect identifier inside a class body */
|
||||
} lexer_obj_ident_opts_t;
|
||||
|
||||
|
||||
/**
|
||||
* Lexer literal object types.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user