(
this: Parser,
node: Undone<T>,
isStatement: /* T === ClassDeclaration */ boolean,
optionalId?: boolean,
)
| 1606 | // `isStatement` parameter). |
| 1607 | |
| 1608 | parseClass<T extends N.Class>( |
| 1609 | this: Parser, |
| 1610 | node: Undone<T>, |
| 1611 | isStatement: /* T === ClassDeclaration */ boolean, |
| 1612 | optionalId?: boolean, |
| 1613 | ): T { |
| 1614 | this.next(); // 'class' |
| 1615 | |
| 1616 | // A class definition is always strict mode code. |
| 1617 | const oldStrict = this.state.strict; |
| 1618 | this.state.strict = true; |
| 1619 | |
| 1620 | this.parseClassId(node, isStatement, optionalId); |
| 1621 | this.parseClassSuper(node); |
| 1622 | // this.state.strict is restored in parseClassBody |
| 1623 | node.body = this.parseClassBody(!!node.superClass, oldStrict); |
| 1624 | |
| 1625 | return this.finishNode( |
| 1626 | node, |
| 1627 | isStatement ? "ClassDeclaration" : "ClassExpression", |
| 1628 | ); |
| 1629 | } |
| 1630 | |
| 1631 | isClassProperty(): boolean { |
| 1632 | return ( |
nothing calls this directly
no test coverage detected