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

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