rename folders, add more

This commit is contained in:
Henry Zhu 2017-08-03 18:00:17 -04:00
parent 2dbba25d1a
commit de47b0423f
124 changed files with 44 additions and 22 deletions

View File

@ -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`,
);
}

View File

@ -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 {

View File

@ -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,

View File

@ -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)"
}

View File

@ -0,0 +1 @@
1n

View File

@ -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": []
}

View File

@ -0,0 +1,4 @@
class Point {
#x = 1;
#y = 2;
}

View File

@ -0,0 +1,4 @@
{
"throws": "This experimental syntax requires enabling the parser plugin: 'classPrivateProperties' (2:3)",
"plugins": []
}

View File

@ -0,0 +1 @@
export A from 'test';

View File

@ -0,0 +1,4 @@
{
"throws": "This experimental syntax requires enabling the parser plugin: 'exportExtensions' (1:1)",
"plugins": []
}

View File

@ -0,0 +1 @@
1_0

View File

@ -0,0 +1,4 @@
{
"throws": "This experimental syntax requires enabling the parser plugin: 'numericSeparator' (1:17)",
"plugins": []
}

View File

@ -0,0 +1,4 @@
{
"plugins": ["flow"],
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'classProperties, typescript' (2:14)"
}

View File

@ -0,0 +1,4 @@
{
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'classProperties, typescript' (2:6)",
"plugins": []
}

View File

@ -0,0 +1,4 @@
{
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'classProperties, typescript' (2:5)",
"plugins": []
}

View File

@ -0,0 +1,4 @@
{
"throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'decorators, decorators2' (1:0)",
"plugins": []
}

View File

@ -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)"
}

View File

@ -1,4 +0,0 @@
{
"plugins": ["flow"],
"throws": "You can only use Class Properties when the 'classProperties' plugin is enabled. (2:14)"
}

View File

@ -1,3 +0,0 @@
{
"throws": "You can only use Class Properties when the 'classProperties' plugin is enabled. (2:2)"
}

View File

@ -1,3 +0,0 @@
{
"throws": "You can only use Class Properties when the 'classProperties' plugin is enabled. (2:2)"
}

View File

@ -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