Fix decorators2 to support export @decorator class A {} (#767)
* Fix decorators2 to support `export @decorator class A {}`
* change to better error message
Also ensure that null/undefined options get default value
This commit is contained in:
@@ -1424,7 +1424,8 @@ export default class StatementParser extends ExpressionParser {
|
||||
this.state.type.keyword === "let" ||
|
||||
this.state.type.keyword === "function" ||
|
||||
this.state.type.keyword === "class" ||
|
||||
this.isContextual("async")
|
||||
this.isContextual("async") ||
|
||||
(this.match(tt.at) && this.expectPlugin("decorators2"))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user