[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:
Gonzalo Rodríguez
2019-09-23 17:07:52 -04:00
committed by Nicolò Ribaudo
parent f339d2d034
commit 69d00dc5b0
9 changed files with 27 additions and 17 deletions

View File

@@ -0,0 +1 @@
{ "throws": "Numeric separator can not be used after leading 0 (1:1)" }

View File

@@ -0,0 +1 @@
{ "throws": "Numeric separator can not be used after leading 0 (1:2)" }

View File

@@ -1,3 +1,3 @@
{
"plugins": ["numericSeparator"]
"plugins": ["bigInt", "numericSeparator"]
}