Support let identifier in non-strict mode. (#3427)
This code adds a lot of checks and complexity to the code. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
committed by
Dániel Bátyai
parent
6cc9848afc
commit
531f1e9687
@@ -381,7 +381,7 @@ parser_module_parse_export_clause (parser_context_t *context_p) /**< parser cont
|
||||
uint16_t export_name_index = PARSER_MAXIMUM_NUMBER_OF_LITERALS;
|
||||
|
||||
lexer_next_token (context_p);
|
||||
if (lexer_compare_literal_to_identifier (context_p, "as", 2))
|
||||
if (lexer_token_is_identifier (context_p, "as", 2))
|
||||
{
|
||||
lexer_next_token (context_p);
|
||||
|
||||
@@ -433,7 +433,7 @@ parser_module_parse_export_clause (parser_context_t *context_p) /**< parser cont
|
||||
lexer_next_token (context_p);
|
||||
}
|
||||
|
||||
if (lexer_compare_literal_to_identifier (context_p, "from", 4))
|
||||
if (lexer_token_is_identifier (context_p, "from", 4))
|
||||
{
|
||||
parser_raise_error (context_p, PARSER_ERR_RIGHT_BRACE_EXPECTED);
|
||||
}
|
||||
@@ -480,7 +480,7 @@ parser_module_parse_import_clause (parser_context_t *context_p) /**< parser cont
|
||||
uint16_t local_name_index = PARSER_MAXIMUM_NUMBER_OF_LITERALS;
|
||||
|
||||
lexer_next_token (context_p);
|
||||
if (lexer_compare_literal_to_identifier (context_p, "as", 2))
|
||||
if (lexer_token_is_identifier (context_p, "as", 2))
|
||||
{
|
||||
lexer_next_token (context_p);
|
||||
|
||||
@@ -540,7 +540,7 @@ parser_module_parse_import_clause (parser_context_t *context_p) /**< parser cont
|
||||
lexer_next_token (context_p);
|
||||
}
|
||||
|
||||
if (lexer_compare_literal_to_identifier (context_p, "from", 4))
|
||||
if (lexer_token_is_identifier (context_p, "from", 4))
|
||||
{
|
||||
parser_raise_error (context_p, PARSER_ERR_RIGHT_BRACE_EXPECTED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user