Add support for function rest parameter (#2647)
ECMAScript v6, 14.1. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
committed by
Akos Kiss
parent
a42f239abb
commit
4c1ee94652
@@ -1043,6 +1043,16 @@ parser_error_to_string (parser_error_t error) /**< error code */
|
||||
{
|
||||
return "Duplicated function argument names are not allowed here.";
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_FUNCTION_PARAMETER_INITIALIZER */
|
||||
#ifndef CONFIG_DISABLE_ES2015_FUNCTION_PARAMETER_INITIALIZER
|
||||
case PARSER_ERR_FORMAL_PARAM_AFTER_REST_PARAMETER:
|
||||
{
|
||||
return "Rest parameter must be last formal parameter.";
|
||||
}
|
||||
case PARSER_ERR_REST_PARAMETER_DEFAULT_INITIALIZER:
|
||||
{
|
||||
return "Rest parameter may not have a default initializer.";
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_FUNCTION_PARAMETER_INITIALIZER */
|
||||
case PARSER_ERR_OBJECT_PROPERTY_REDEFINED:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user