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:
Robert Sipka
2021-10-29 09:52:30 +02:00
committed by GitHub
parent 3c742bef57
commit 9ed695f9d2
3 changed files with 11 additions and 5 deletions
+2 -1
View File
@@ -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)
{