Fix parsing of slash after class expression (#8804)

This commit is contained in:
Brian Ng
2018-10-02 20:45:53 -05:00
committed by GitHub
parent a5b5ed928d
commit 2575312d1f
3 changed files with 571 additions and 1 deletions

View File

@@ -106,7 +106,7 @@ tt.incDec.updateContext = function() {
// tokExprAllowed stays unchanged
};
tt._function.updateContext = function(prevType) {
tt._function.updateContext = tt._class.updateContext = function(prevType) {
if (this.state.exprAllowed && !this.braceIsBlock(prevType)) {
this.state.context.push(types.functionExpression);
}