[parser] Better error message for missing number exponent (#12072)

* fix(babel-parser) better error message for missing number exponent after 'e'

* fix(babel-parser) requested changes

* msg

Co-authored-by: Brian Ng <bng412@gmail.com>
This commit is contained in:
iamfotx
2020-10-15 00:17:38 +05:00
committed by GitHub
parent f697e7995d
commit 59d97d9bca
8 changed files with 11 additions and 7 deletions

View File

@@ -2,7 +2,7 @@
"type": "File",
"start":0,"end":2,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":2}},
"errors": [
"SyntaxError: Invalid number (1:0)"
"SyntaxError: Floating-point numbers require a valid exponent after the 'e' (1:0)"
],
"program": {
"type": "Program",

View File

@@ -2,7 +2,7 @@
"type": "File",
"start":0,"end":3,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":3}},
"errors": [
"SyntaxError: Invalid number (1:0)"
"SyntaxError: Floating-point numbers require a valid exponent after the 'e' (1:0)"
],
"program": {
"type": "Program",

View File

@@ -2,7 +2,7 @@
"type": "File",
"start":0,"end":3,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":3}},
"errors": [
"SyntaxError: Invalid number (1:0)"
"SyntaxError: Floating-point numbers require a valid exponent after the 'e' (1:0)"
],
"program": {
"type": "Program",

View File

@@ -2,7 +2,7 @@
"type": "File",
"start":0,"end":2,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":2}},
"errors": [
"SyntaxError: Invalid number (1:0)"
"SyntaxError: Floating-point numbers require a valid exponent after the 'e' (1:0)"
],
"program": {
"type": "Program",

View File

@@ -2,7 +2,7 @@
"type": "File",
"start":0,"end":3,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":3}},
"errors": [
"SyntaxError: Invalid number (1:0)"
"SyntaxError: Floating-point numbers require a valid exponent after the 'e' (1:0)"
],
"program": {
"type": "Program",

View File

@@ -2,7 +2,7 @@
"type": "File",
"start":0,"end":3,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":3}},
"errors": [
"SyntaxError: Invalid number (1:0)"
"SyntaxError: Floating-point numbers require a valid exponent after the 'e' (1:0)"
],
"program": {
"type": "Program",