()
| 1600 | |
| 1601 | // Parse the `super` keyword |
| 1602 | parseSuper(): N.Super { |
| 1603 | const node = this.startNode<N.Super>(); |
| 1604 | this.next(); // eat `super` |
| 1605 | if (this.match(tt.parenL) && !this.scope.allowDirectSuper) { |
| 1606 | this.raise(Errors.SuperNotAllowed, node); |
| 1607 | } else if (!this.scope.allowSuper) { |
| 1608 | this.raise(Errors.UnexpectedSuper, node); |
| 1609 | } |
| 1610 | |
| 1611 | if ( |
| 1612 | !this.match(tt.parenL) && |
| 1613 | !this.match(tt.bracketL) && |
| 1614 | !this.match(tt.dot) |
| 1615 | ) { |
| 1616 | this.raise(Errors.UnsupportedSuper, node); |
| 1617 | } |
| 1618 | |
| 1619 | return this.finishNode(node, "Super"); |
| 1620 | } |
| 1621 | |
| 1622 | parsePrivateName(): N.PrivateName { |
| 1623 | const node = this.startNode<N.PrivateName>(); |
nothing calls this directly
no test coverage detected