(
node: Undone<N.Class | N.StructDeclaration>,
isStatement: boolean,
optionalId?: boolean | null,
bindingType: BindingFlag = BindingFlag.TYPE_CLASS,
)
| 2191 | } |
| 2192 | |
| 2193 | parseClassId( |
| 2194 | node: Undone<N.Class | N.StructDeclaration>, |
| 2195 | isStatement: boolean, |
| 2196 | optionalId?: boolean | null, |
| 2197 | bindingType: BindingFlag = BindingFlag.TYPE_CLASS, |
| 2198 | ): void { |
| 2199 | if (tokenIsIdentifier(this.state.type)) { |
| 2200 | node.id = this.parseIdentifier(); |
| 2201 | this.checkStrictBindReservedWord(node.id, bindingType); |
| 2202 | if (isStatement) { |
| 2203 | this.declareNameFromIdentifier(node.id, bindingType); |
| 2204 | } |
| 2205 | } else { |
| 2206 | if (optionalId || !isStatement) { |
| 2207 | node.id = null; |
| 2208 | } else { |
| 2209 | throw this.raise(Errors.MissingClassName, this.state.startLoc); |
| 2210 | } |
| 2211 | } |
| 2212 | } |
| 2213 | |
| 2214 | // https://tc39.es/ecma262/#prod-ClassHeritage |
| 2215 | parseClassSuper( |
nothing calls this directly
no test coverage detected