Add support for function rest parameter (#2647)

ECMAScript v6, 14.1.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-01-25 09:24:39 +01:00
committed by Akos Kiss
parent a42f239abb
commit 4c1ee94652
14 changed files with 185 additions and 3 deletions
+7
View File
@@ -865,6 +865,13 @@ parser_scan_until (parser_context_t *context_p, /**< context */
{
while (true)
{
#ifndef CONFIG_DISABLE_ES2015_FUNCTION_REST_PARAMETER
if (context_p->token.type == LEXER_THREE_DOTS)
{
lexer_next_token (context_p);
}
#endif /* !CONFIG_DISABLE_ES2015_FUNCTION_REST_PARAMETER */
if (context_p->token.type != LEXER_LITERAL
|| context_p->token.lit_location.type != LEXER_IDENT_LITERAL)
{