Disallow exports between decorator & class body

For stage 2 decorators
This commit is contained in:
Peeyush Kushwaha
2017-06-17 18:12:14 +05:30
parent 9c639743dd
commit b5e23835ce
10 changed files with 6 additions and 379 deletions

View File

@@ -157,6 +157,10 @@ export default class StatementParser extends ExpressionParser {
}
parseDecorators(allowExport?: boolean): void {
if (this.hasPlugin("decorators-stage-2")) {
allowExport = false;
}
while (this.match(tt.at)) {
const decorator = this.parseDecorator();
this.state.decorators.push(decorator);