Implement ... support for object initializers. (#3968)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-07-02 15:04:21 +02:00
committed by GitHub
parent eb77f96d20
commit 9e18ff29c6
12 changed files with 208 additions and 33 deletions
+11
View File
@@ -2883,6 +2883,17 @@ scanner_scan_all (parser_context_t *context_p, /**< context */
scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION;
break;
}
if (context_p->token.type == LEXER_THREE_DOTS)
{
scanner_context.mode = SCAN_MODE_PRIMARY_EXPRESSION;
if (scanner_context.binding_type != SCANNER_BINDING_NONE)
{
scanner_context.mode = SCAN_MODE_BINDING;
}
break;
}
#endif /* ENABLED (JERRY_ESNEXT) */
if (context_p->token.type == LEXER_RIGHT_BRACE)