New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix assignment lookahead in parser_process_group_expression #3828
Conversation
if (context_p->token.type == LEXER_ASSIGN) | ||
#if ENABLED (JERRY_ES2015) | ||
if (context_p->token.type == LEXER_ASSIGN | ||
&& parser_is_assignment_expr (context_p)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about limiting this to identifiers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
a7796a1
to
34c9833
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
parser_append_binary_single_assignment_token (context_p, flags); | ||
lexer_next_token (context_p); | ||
return true; | ||
/* Lookahead for anonymous function declatartion after '=' token when the assignment base is LHS expression |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
declatartion -> declaration
This patch fixes jerryscript-project#3815 and fixes jerryscript-project#3819. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This patch fixes #3815.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu