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:
committed by
Akos Kiss
parent
a42f239abb
commit
4c1ee94652
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user