Add some parser missing plugins errors (#11478)
* fix: do not throw invalid hash in tokenizer * refactor: bigint has been enabled by default * polish: add numeric separator missing plugin error * fix: forward expectPlugin declaration
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Unexpected character '#' (1:2)"
|
||||
}
|
||||
"throws": "Unexpected token, expected \";\" (1:2)"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
1n
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling the parser plugin: 'classPrivateProperties' (2:3)",
|
||||
"plugins": []
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'classPrivateProperties, classPrivateMethods' (2:2)"
|
||||
}
|
||||
1
packages/babel-parser/test/fixtures/experimental/_no-plugin/numeric-separator-radix/input.js
vendored
Normal file
1
packages/babel-parser/test/fixtures/experimental/_no-plugin/numeric-separator-radix/input.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0b1_0
|
||||
@@ -1,4 +1,3 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling the parser plugin: 'bigInt' (1:1)",
|
||||
"plugins": []
|
||||
}
|
||||
"throws": "This experimental syntax requires enabling the parser plugin: 'numericSeparator' (1:3)"
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling the parser plugin: 'numericSeparator' (1:17)",
|
||||
"plugins": []
|
||||
}
|
||||
"throws": "This experimental syntax requires enabling the parser plugin: 'numericSeparator' (1:1)"
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
{
|
||||
"plugins": [],
|
||||
"throws": "Unexpected character '#' (1:0)"
|
||||
}
|
||||
"throws": "This experimental syntax requires enabling the parser plugin: 'recordAndTuple' (1:0)"
|
||||
}
|
||||
Reference in New Issue
Block a user