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:
committed by
Dániel Bátyai
parent
aadfa13c38
commit
6b43ef8605
@@ -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.";
|
||||
|
||||
Reference in New Issue
Block a user