Fix NumericLiteralSeparator SyntaxError message to match V8 (#743)

This commit is contained in:
Rick Waldron 2017-09-28 14:25:30 -04:00 committed by Henry Zhu
parent ab268877fd
commit b8ba10532e
25 changed files with 25 additions and 25 deletions

View File

@ -733,7 +733,7 @@ export default class Tokenizer extends LocationParser {
forbiddenSiblings.indexOf(next) > -1 ||
Number.isNaN(next)
) {
this.raise(this.state.pos, "Invalid NumericLiteralSeparator");
this.raise(this.state.pos, "Invalid or unexpected token");
}
// Ignore this _ character

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:1)" }
{ "throws": "Invalid or unexpected token (1:1)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:3)" }
{ "throws": "Invalid or unexpected token (1:3)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:5)" }
{ "throws": "Invalid or unexpected token (1:5)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:5)" }
{ "throws": "Invalid or unexpected token (1:5)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
{ "throws": "Invalid or unexpected token (1:2)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
{ "throws": "Invalid or unexpected token (1:2)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
{ "throws": "Invalid or unexpected token (1:2)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
{ "throws": "Invalid or unexpected token (1:2)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
{ "throws": "Invalid or unexpected token (1:2)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
{ "throws": "Invalid or unexpected token (1:2)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
{ "throws": "Invalid or unexpected token (1:2)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
{ "throws": "Invalid or unexpected token (1:2)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:3)" }
{ "throws": "Invalid or unexpected token (1:3)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
{ "throws": "Invalid or unexpected token (1:2)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:6)" }
{ "throws": "Invalid or unexpected token (1:6)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:5)" }
{ "throws": "Invalid or unexpected token (1:5)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:2)" }
{ "throws": "Invalid or unexpected token (1:2)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:1)" }
{ "throws": "Invalid or unexpected token (1:1)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:3)" }
{ "throws": "Invalid or unexpected token (1:3)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:4)" }
{ "throws": "Invalid or unexpected token (1:4)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:5)" }
{ "throws": "Invalid or unexpected token (1:5)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:5)" }
{ "throws": "Invalid or unexpected token (1:5)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:6)" }
{ "throws": "Invalid or unexpected token (1:6)" }

View File

@ -1 +1 @@
{ "throws": "Invalid NumericLiteralSeparator (1:6)" }
{ "throws": "Invalid or unexpected token (1:6)" }