[legacy decorators] Allow decorating generator methods (#9912)

* [legacy decorators] Allow decorating generator methods

The old proposal used LeftHandSideExpression (instead of
AssignmentExpression) to satisfy this usecase:
e240cbc91a

* Update flow whitelist
This commit is contained in:
Nicolò Ribaudo
2019-06-30 11:32:16 +02:00
committed by GitHub
parent ca67637da4
commit 8bf9714d69
4 changed files with 180 additions and 2 deletions

View File

@@ -390,7 +390,7 @@ export default class StatementParser extends ExpressionParser {
node.expression = this.parseMaybeDecoratorArguments(expr);
this.state.decoratorStack.pop();
} else {
node.expression = this.parseMaybeAssign();
node.expression = this.parseExprSubscripts();
}
return this.finishNode(node, "Decorator");
}