(
this: Parser,
hadSuperClass: boolean,
oldStrict: boolean,
)
| 2244 | } |
| 2245 | |
| 2246 | parseStructBody( |
| 2247 | this: Parser, |
| 2248 | hadSuperClass: boolean, |
| 2249 | oldStrict: boolean, |
| 2250 | ): N.StructBody { |
| 2251 | this.classScope.enter(); |
| 2252 | |
| 2253 | const state: N.ParseClassMemberState = { |
| 2254 | hadConstructor: false, |
| 2255 | hadSuperClass, |
| 2256 | }; |
| 2257 | const structBody = this.startNode<N.StructBody>(); |
| 2258 | structBody.body = []; |
| 2259 | this.expect(tt.braceL); |
| 2260 | |
| 2261 | while (!this.match(tt.braceR)) { |
| 2262 | if (this.eat(tt.semi)) { |
| 2263 | continue; |
| 2264 | } |
| 2265 | const member = this.startNode<N.ClassMember>(); |
| 2266 | this.parseClassMember(structBody, member, state); |
| 2267 | } |
| 2268 | |
| 2269 | this.state.strict = oldStrict; |
| 2270 | this.next(); // eat `}` |
| 2271 | this.classScope.exit(); |
| 2272 | |
| 2273 | return this.finishNode(structBody, "StructBody"); |
| 2274 | } |
| 2275 | |
| 2276 | // Parses module export declaration. |
| 2277 | // https://tc39.es/ecma262/#prod-ExportDeclaration |
nothing calls this directly
no test coverage detected