Fix tagged template literal call precedence for new operator (#3998)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2020-07-24 11:22:09 +02:00
committed by GitHub
parent fdb5d893bf
commit f596211553
3 changed files with 49 additions and 3 deletions
+7 -2
View File
@@ -2216,8 +2216,13 @@ parser_process_unary_expression (parser_context_t *context_p, /**< context */
if (context_p->stack_top_uint8 == LEXER_KEYW_NEW)
{
parser_stack_pop_uint8 (context_p);
opcode = CBC_NEW;
#if ENABLED (JERRY_ESNEXT)
if (context_p->token.type == LEXER_LEFT_PAREN)
#endif /* ENABLED (JERRY_ESNEXT) */
{
parser_stack_pop_uint8 (context_p);
opcode = CBC_NEW;
}
}
else
{