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