Add support for function argument initializers. (#2571)
EcmaScript 2015 14.1. Note: arrow functions with default arguments are not supported yet. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
committed by
László Langó
parent
aeddb1cd88
commit
83fc0aa04f
@@ -1038,6 +1038,12 @@ parser_error_to_string (parser_error_t error) /**< error code */
|
||||
{
|
||||
return "Duplicated label.";
|
||||
}
|
||||
#ifndef CONFIG_DISABLE_ES2015_FUNCTION_PARAMETER_INITIALIZER
|
||||
case PARSER_ERR_DUPLICATED_ARGUMENT_NAMES:
|
||||
{
|
||||
return "Duplicated function argument names are not allowed here.";
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_FUNCTION_PARAMETER_INITIALIZER */
|
||||
case PARSER_ERR_OBJECT_PROPERTY_REDEFINED:
|
||||
{
|
||||
return "Property of object literal redefined.";
|
||||
|
||||
Reference in New Issue
Block a user