Arrow functions should be parsed as assignment expressions. (#3336)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2019-11-21 11:32:33 +01:00
committed by Dániel Bátyai
parent aadfa13c38
commit 6b43ef8605
5 changed files with 75 additions and 11 deletions
+4
View File
@@ -1121,6 +1121,10 @@ parser_error_to_string (parser_error_t error) /**< error code */
{
return "Expected 'of' token.";
}
case PARSER_ERR_ASSIGNMENT_EXPECTED:
{
return "Unexpected arrow function or yield expression (parentheses around the expression may help).";
}
case PARSER_ERR_DUPLICATED_ARGUMENT_NAMES:
{
return "Duplicated function argument names are not allowed here.";