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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user