Reorganize tests; camelCase plugin name

This commit is contained in:
Peeyush Kushwaha
2017-06-18 01:25:54 +05:30
parent b5e23835ce
commit 38c417e971
17 changed files with 13 additions and 13 deletions

View File

@@ -157,7 +157,7 @@ export default class StatementParser extends ExpressionParser {
}
parseDecorators(allowExport?: boolean): void {
if (this.hasPlugin("decorators-stage-2")) {
if (this.hasPlugin("decoratorsStage2")) {
allowExport = false;
}
@@ -176,14 +176,14 @@ export default class StatementParser extends ExpressionParser {
}
parseDecorator(): N.Decorator {
if (!(this.hasPlugin("decorators") || this.hasPlugin("decorators-stage-2"))) {
if (!(this.hasPlugin("decorators") || this.hasPlugin("decoratorsStage2"))) {
this.unexpected();
}
const node = this.startNode();
this.next();
if (this.hasPlugin("decorators-stage-2")) {
if (this.hasPlugin("decoratorsStage2")) {
const startPos = this.state.start;
const startLoc = this.state.startLoc;
let expr = this.parseIdentifier(false);
@@ -714,7 +714,7 @@ export default class StatementParser extends ExpressionParser {
this.parseClassMember(classBody, member, state);
if (this.hasPlugin("decorators-stage-2") && member.kind != "method" && member.decorators && member.decorators.length > 0) {
if (this.hasPlugin("decoratorsStage2") && member.kind != "method" && member.decorators && member.decorators.length > 0) {
this.raise(member.start, "Stage 2 decorators may only be used with a class or a class method");
}
}