Implement BigInt literal parsing in the parser. (#4089)

Support octal literals for BigInts.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-08-04 14:16:38 +02:00
committed by GitHub
parent be9dbeffdb
commit b5a96c9eca
16 changed files with 481 additions and 215 deletions
+6
View File
@@ -869,6 +869,12 @@ parser_error_to_string (parser_error_t error) /**< error code */
{
return "Identifier cannot start after a number.";
}
#if ENABLED (JERRY_BUILTIN_BIGINT)
case PARSER_ERR_INVALID_BIGINT:
{
return "Number is not a valid BigInt.";
}
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) */
case PARSER_ERR_INVALID_REGEXP:
{
return "Invalid regular expression.";