Fix super property reference parsing (#2672)

`PARSER_CLASS_SUPER_PROP_REFERENCE` flag should be applied for only binary lvalue tokens.
This patch fixed #2671.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-01-08 09:33:26 +01:00
committed by Zoltan Herczeg
parent 7b48be81c3
commit ef2c3b46d7
2 changed files with 50 additions and 1 deletions
+1 -1
View File
@@ -1409,7 +1409,7 @@ parser_parse_unary_expression (parser_context_t *context_p, /**< context */
|| lexer_check_next_character (context_p, LIT_CHAR_LEFT_SQUARE))
&& context_p->status_flags & (PARSER_CLASS_HAS_SUPER | PARSER_IS_ARROW_FUNCTION))
{
if (!LEXER_IS_BINARY_OP_TOKEN (context_p->stack_top_uint8))
if (!LEXER_IS_BINARY_LVALUE_TOKEN (context_p->stack_top_uint8))
{
context_p->status_flags |= PARSER_CLASS_SUPER_PROP_REFERENCE;
}