(this: Parser, allowExport?: boolean)
| 650 | } |
| 651 | |
| 652 | parseDecorators(this: Parser, allowExport?: boolean): N.Decorator[] { |
| 653 | const decorators = []; |
| 654 | do { |
| 655 | decorators.push(this.parseDecorator()); |
| 656 | } while (this.match(tt.at)); |
| 657 | |
| 658 | if (this.match(tt._export)) { |
| 659 | if (!allowExport) { |
| 660 | this.unexpected(); |
| 661 | } |
| 662 | } else if (!this.canHaveLeadingDecorator()) { |
| 663 | throw this.raise(Errors.UnexpectedLeadingDecorator, this.state.startLoc); |
| 664 | } |
| 665 | |
| 666 | return decorators; |
| 667 | } |
| 668 | |
| 669 | parseDecorator(this: Parser): N.Decorator { |
| 670 | this.expectOnePlugin(["decorators", "decorators-legacy"]); |
nothing calls this directly
no test coverage detected