Legacy octal escapes should not be allowed in template strings (#4227)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
This commit is contained in:
@@ -1003,6 +1003,12 @@ parser_error_to_string (parser_error_t error) /**< error code */
|
||||
{
|
||||
return "Octal escape sequences are not allowed in strict mode.";
|
||||
}
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
case PARSER_ERR_TEMPLATE_STR_OCTAL_ESCAPE:
|
||||
{
|
||||
return "Octal escape sequences are not allowed in template strings.";
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
case PARSER_ERR_STRICT_IDENT_NOT_ALLOWED:
|
||||
{
|
||||
return "Identifier name is reserved in strict mode.";
|
||||
|
||||
Reference in New Issue
Block a user