(
this: Parser,
node: Undone<N.StructDeclaration>,
optionalId?: boolean | null,
)
| 2225 | } |
| 2226 | |
| 2227 | parseStructDeclaration( |
| 2228 | this: Parser, |
| 2229 | node: Undone<N.StructDeclaration>, |
| 2230 | optionalId?: boolean | null, |
| 2231 | ): N.StructDeclaration { |
| 2232 | this.next(); // 'struct' |
| 2233 | |
| 2234 | // A struct definition is always strict mode code. |
| 2235 | const oldStrict = this.state.strict; |
| 2236 | this.state.strict = true; |
| 2237 | |
| 2238 | this.parseClassId(node, true, optionalId); |
| 2239 | this.parseClassSuper(node); |
| 2240 | // this.state.strict is restored in parseStructBody |
| 2241 | node.body = this.parseStructBody(!!node.superClass, oldStrict); |
| 2242 | |
| 2243 | return this.finishNode(node, "StructDeclaration"); |
| 2244 | } |
| 2245 | |
| 2246 | parseStructBody( |
| 2247 | this: Parser, |
nothing calls this directly
no test coverage detected