rename folders, add more
This commit is contained in:
parent
2dbba25d1a
commit
de47b0423f
@ -866,7 +866,7 @@ export default class ExpressionParser extends LValParser {
|
||||
this.expectPlugin("importMeta");
|
||||
} else if (!this.hasPlugin("importMeta")) {
|
||||
this.raise(
|
||||
null,
|
||||
id.start,
|
||||
`Dynamic imports require a parameter: import('a.js').then`,
|
||||
);
|
||||
}
|
||||
|
||||
@ -1151,17 +1151,14 @@ export default class StatementParser extends ExpressionParser {
|
||||
}
|
||||
|
||||
parseClassProperty(node: N.ClassProperty): N.ClassProperty {
|
||||
const noPluginMsg =
|
||||
"You can only use Class Properties when the 'classProperties' plugin is enabled.";
|
||||
if (!node.typeAnnotation && !this.hasPlugin("classProperties")) {
|
||||
this.raise(node.start, noPluginMsg);
|
||||
if (!node.typeAnnotation) {
|
||||
this.expectOnePlugin(["classProperties"]);
|
||||
}
|
||||
|
||||
this.state.inClassProperty = true;
|
||||
|
||||
if (this.match(tt.eq)) {
|
||||
if (!this.hasPlugin("classProperties"))
|
||||
this.raise(this.state.start, noPluginMsg);
|
||||
this.expectOnePlugin(["classProperties"]);
|
||||
this.next();
|
||||
node.value = this.parseMaybeAssign();
|
||||
} else {
|
||||
|
||||
@ -124,7 +124,7 @@ export default class UtilParser extends Tokenizer {
|
||||
if (!names.some(n => this.hasPlugin(n))) {
|
||||
throw this.raise(
|
||||
this.state.start,
|
||||
`This experimental syntax requires enabling the parser plugin(s): '${names.join(
|
||||
`This experimental syntax requires enabling one of the following parser plugin(s): '${names.join(
|
||||
", ",
|
||||
)}'`,
|
||||
names,
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "You can only use Class Properties when the 'classProperties' plugin is enabled. (2:2)"
|
||||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'classProperties, typescript' (3:2)"
|
||||
}
|
||||
|
||||
1
test/fixtures/experimental/_no-plugin/.bigint/actual.js
vendored
Normal file
1
test/fixtures/experimental/_no-plugin/.bigint/actual.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
1n
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling the parser plugin(s): 'decorators, decorators2' (1:0)",
|
||||
"throws": "This experimental syntax requires enabling the parser plugin: 'bigInt' (1:1)",
|
||||
"plugins": []
|
||||
}
|
||||
4
test/fixtures/experimental/_no-plugin/.class-private-properties/actual.js
vendored
Normal file
4
test/fixtures/experimental/_no-plugin/.class-private-properties/actual.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
class Point {
|
||||
#x = 1;
|
||||
#y = 2;
|
||||
}
|
||||
4
test/fixtures/experimental/_no-plugin/.class-private-properties/options.json
vendored
Normal file
4
test/fixtures/experimental/_no-plugin/.class-private-properties/options.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling the parser plugin: 'classPrivateProperties' (2:3)",
|
||||
"plugins": []
|
||||
}
|
||||
1
test/fixtures/experimental/_no-plugin/.export-extensions/actual.js
vendored
Normal file
1
test/fixtures/experimental/_no-plugin/.export-extensions/actual.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
export A from 'test';
|
||||
4
test/fixtures/experimental/_no-plugin/.export-extensions/options.json
vendored
Normal file
4
test/fixtures/experimental/_no-plugin/.export-extensions/options.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling the parser plugin: 'exportExtensions' (1:1)",
|
||||
"plugins": []
|
||||
}
|
||||
1
test/fixtures/experimental/_no-plugin/.numeric-separator/actual.js
vendored
Normal file
1
test/fixtures/experimental/_no-plugin/.numeric-separator/actual.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
1_0
|
||||
4
test/fixtures/experimental/_no-plugin/.numeric-separator/options.json
vendored
Normal file
4
test/fixtures/experimental/_no-plugin/.numeric-separator/options.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling the parser plugin: 'numericSeparator' (1:17)",
|
||||
"plugins": []
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
{
|
||||
"plugins": ["flow"],
|
||||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'classProperties, typescript' (2:14)"
|
||||
}
|
||||
4
test/fixtures/experimental/_no-plugin/class-properties-with-initializer/options.json
vendored
Normal file
4
test/fixtures/experimental/_no-plugin/class-properties-with-initializer/options.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'classProperties, typescript' (2:6)",
|
||||
"plugins": []
|
||||
}
|
||||
4
test/fixtures/experimental/_no-plugin/class-properties-without-initializer/options.json
vendored
Normal file
4
test/fixtures/experimental/_no-plugin/class-properties-without-initializer/options.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'classProperties, typescript' (2:5)",
|
||||
"plugins": []
|
||||
}
|
||||
4
test/fixtures/experimental/_no-plugin/decorators/options.json
vendored
Normal file
4
test/fixtures/experimental/_no-plugin/decorators/options.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'decorators, decorators2' (1:0)",
|
||||
"plugins": []
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "You can only use Class Properties when the 'classProperties' plugin is enabled. (2:2)"
|
||||
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'classProperties, typescript' (3:2)"
|
||||
}
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
{
|
||||
"plugins": ["flow"],
|
||||
"throws": "You can only use Class Properties when the 'classProperties' plugin is enabled. (2:14)"
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"throws": "You can only use Class Properties when the 'classProperties' plugin is enabled. (2:2)"
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"throws": "You can only use Class Properties when the 'classProperties' plugin is enabled. (2:2)"
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"throws": "Dynamic imports require a parameter: import('a.js').then (1:0)"
|
||||
"throws": "Dynamic imports require a parameter: import('a.js').then (2:9)"
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user