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