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
+16
View File
@@ -3061,6 +3061,22 @@ lexer_expect_object_literal_id (parser_context_t *context_p, /**< context */
lexer_consume_next_character (context_p);
return;
}
case LIT_CHAR_DOT:
{
if (ident_opts != LEXER_OBJ_IDENT_NO_OPTS
|| context_p->source_p + 2 >= context_p->source_end_p
|| context_p->source_p[1] != LIT_CHAR_DOT
|| context_p->source_p[2] != LIT_CHAR_DOT)
{
break;
}
context_p->token.type = LEXER_THREE_DOTS;
context_p->token.flags &= (uint8_t) ~LEXER_NO_SKIP_SPACES;
PARSER_PLUS_EQUAL_LC (context_p->column, 3);
context_p->source_p += 3;
return;
}
#endif /* ENABLED (JERRY_ESNEXT) */
case LIT_CHAR_RIGHT_BRACE:
{