[parser] Invalid NonOctal Decimal (#10467)
* Add test * Add nonOctalDecimal verification * Update regex and code style * Refactor non octal detection * Add numeric separator test * Disallow numeric separators in non octals * Update whitelist * Better test naming * Disallow numeric separators in non oct for all numbers * Specific error above the general error * Add test for invalid leading zero in num separator * Add start position to error
This commit is contained in:
committed by
Nicolò Ribaudo
parent
f339d2d034
commit
69d00dc5b0
@@ -0,0 +1 @@
|
||||
0_8
|
||||
@@ -0,0 +1 @@
|
||||
{ "throws": "Numeric separator can not be used after leading 0 (1:1)" }
|
||||
@@ -0,0 +1 @@
|
||||
08_0n
|
||||
@@ -0,0 +1 @@
|
||||
{ "throws": "Numeric separator can not be used after leading 0 (1:2)" }
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"plugins": ["numericSeparator"]
|
||||
"plugins": ["bigInt", "numericSeparator"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user