Fix object initializer prescanning issues. (#2563)

This patch fixes incorrect syntax errors reported by the prescanner for
ES5.1 getter/setter property initializers and ES2015 computed properties.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2018-10-19 13:49:41 +02:00
committed by GitHub
parent f8f691deb1
commit e0e6363f85
4 changed files with 161 additions and 1 deletions
+3
View File
@@ -2427,6 +2427,9 @@ lexer_scan_identifier (parser_context_t *context_p, /**< context */
lexer_next_token (context_p);
if (context_p->token.type == LEXER_LITERAL
#ifndef CONFIG_DISABLE_ES2015_OBJECT_INITIALIZER
|| context_p->token.type == LEXER_LEFT_SQUARE
#endif /* !CONFIG_DISABLE_ES2015_OBJECT_INITIALIZER */
|| context_p->token.type == LEXER_RIGHT_BRACE)
{
return;