Add support for new.target (#3469)
Notable changes:
* Extracted the pure JS/builtin and external C method invocations
into two new methods (`ecma_op_function_call_{simple, external}`).
* Updated parser/scanner to handle "new.target" correctly.
* Added JS test case.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This commit is contained in:
committed by
Robert Fancsik
parent
be8ae3aae8
commit
0fd1ed6f27
@@ -1181,6 +1181,14 @@ parser_error_to_string (parser_error_t error) /**< error code */
|
||||
{
|
||||
return "Rest parameter may not have a default initializer.";
|
||||
}
|
||||
case PARSER_ERR_NEW_TARGET_EXPECTED:
|
||||
{
|
||||
return "Expected new.target expression.";
|
||||
}
|
||||
case PARSER_ERR_NEW_TARGET_NOT_ALLOWED:
|
||||
{
|
||||
return "new.target expression is not allowed here.";
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
|
||||
case PARSER_ERR_FILE_NOT_FOUND:
|
||||
|
||||
Reference in New Issue
Block a user