Implement correct construction of let/const declarations and function statements. (#3259)
Various cbc opcodes are added to support the different instantiations. 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
1c34539997
commit
1edfa81c76
@@ -1081,6 +1081,14 @@ parser_error_to_string (parser_error_t error) /**< error code */
|
||||
return "Non-strict argument definition.";
|
||||
}
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
case PARSER_ERR_VARIABLE_REDECLARED:
|
||||
{
|
||||
return "Local variable is redeclared.";
|
||||
}
|
||||
case PARSER_ERR_MISSING_ASSIGN_AFTER_CONST:
|
||||
{
|
||||
return "Value assignment is expected after a const declaration.";
|
||||
}
|
||||
case PARSER_ERR_MULTIPLE_CLASS_CONSTRUCTORS:
|
||||
{
|
||||
return "Multiple constructors are not allowed.";
|
||||
@@ -1117,10 +1125,6 @@ parser_error_to_string (parser_error_t error) /**< error code */
|
||||
{
|
||||
return "Rest parameter may not have a default initializer.";
|
||||
}
|
||||
case PARSER_ERR_VARIABLE_REDECLARED:
|
||||
{
|
||||
return "Local variable is redeclared.";
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
|
||||
case PARSER_ERR_FILE_NOT_FOUND:
|
||||
|
||||
Reference in New Issue
Block a user