Assignment Expression is not allowed in for of head's expression position (#4810)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka robert.sipka@h-lab.eu
This commit is contained in:
@@ -1289,7 +1289,8 @@ parser_parse_for_statement_start (parser_context_t *context_p) /**< context */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
lexer_next_token (context_p);
|
||||
parser_parse_expression (context_p, PARSE_EXPR);
|
||||
int options = is_for_in ? PARSE_EXPR : PARSE_EXPR_LEFT_HAND_SIDE;
|
||||
parser_parse_expression (context_p, options);
|
||||
|
||||
if (context_p->token.type != LEXER_RIGHT_PAREN)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user