Ensure takeDecorators is called on exported class (#358)

This commit is contained in:
Brian Ng
2017-02-22 09:22:38 -06:00
committed by Daniel Tschinder
parent 94eda1254e
commit ad8d520406
4 changed files with 251 additions and 1 deletions

View File

@@ -76,7 +76,6 @@ pp.parseStatement = function (declaration, topLevel) {
case tt._class:
if (!declaration) this.unexpected();
this.takeDecorators(node);
return this.parseClass(node, true);
case tt._if: return this.parseIfStatement(node);
@@ -618,6 +617,7 @@ pp.parseFunctionParams = function (node) {
pp.parseClass = function (node, isStatement, optionalId) {
this.next();
this.takeDecorators(node);
this.parseClassId(node, isStatement, optionalId);
this.parseClassSuper(node);
this.parseClassBody(node);