Export statement parsing should construct new ident literal (#3256)

This patch fixes #3253.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-10-28 15:30:47 +01:00
committed by GitHub
parent 072aedb4ef
commit 448c239f08
3 changed files with 34 additions and 2 deletions
+2 -2
View File
@@ -347,7 +347,7 @@ parser_module_parse_export_clause (parser_context_t *context_p) /**< parser cont
ecma_string_t *export_name_p = NULL;
ecma_string_t *local_name_p = NULL;
lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_IDENT_LITERAL);
lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_NEW_IDENT_LITERAL);
uint16_t local_name_index = context_p->lit_object.index;
uint16_t export_name_index = PARSER_MAXIMUM_NUMBER_OF_LITERALS;
@@ -363,7 +363,7 @@ parser_module_parse_export_clause (parser_context_t *context_p) /**< parser cont
parser_raise_error (context_p, PARSER_ERR_IDENTIFIER_EXPECTED);
}
lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_IDENT_LITERAL);
lexer_construct_literal_object (context_p, &context_p->token.lit_location, LEXER_NEW_IDENT_LITERAL);
export_name_index = context_p->lit_object.index;