Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
11 changed files
with
31 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0065/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"throws": "Unexpected character '#' (1:2)" | ||
} | ||
"throws": "Unexpected token, expected \";\" (1:2)" | ||
} |
1 change: 0 additions & 1 deletion
1
packages/babel-parser/test/fixtures/experimental/_no-plugin/.bigint/input.js
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...babel-parser/test/fixtures/experimental/_no-plugin/.class-private-properties/options.json
This file was deleted.
Oops, something went wrong.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
.../babel-parser/test/fixtures/experimental/_no-plugin/class-private-properties/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'classPrivateProperties, classPrivateMethods' (2:2)" | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/experimental/_no-plugin/numeric-separator-radix/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0b1_0 |
5 changes: 2 additions & 3 deletions
5
...erimental/_no-plugin/.bigint/options.json → ...ugin/numeric-separator-radix/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)" | ||
} |
File renamed without changes.
5 changes: 2 additions & 3 deletions
5
...no-plugin/.numeric-separator/options.json → ..._no-plugin/numeric-separator/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)" | ||
} |
5 changes: 2 additions & 3 deletions
5
...es/babel-parser/test/fixtures/experimental/record-and-tuple/not-enabled-hash/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
{ | ||
"plugins": [], | ||
"throws": "Unexpected character '#' (1:0)" | ||
} | ||
"throws": "This experimental syntax requires enabling the parser plugin: 'recordAndTuple' (1:0)" | ||
} |