MCPcopy Create free account
hub / github.com/babel/babel / StructDeclaration

Function StructDeclaration

packages/babel-generator/src/generators/classes.ts:301–319  ·  view source on GitHub ↗
(this: Printer, node: t.StructDeclaration)

Source from the content-addressed store, hash-verified

299}
300
301export function StructDeclaration(this: Printer, node: t.StructDeclaration) {
302 this.word("struct", true);
303
304 if (node.id) {
305 this.space();
306 this.print(node.id);
307 }
308
309 if (node.superClass) {
310 this.space();
311 this.word("extends");
312 this.space();
313 this.tokenContext |= TokenContext.classHeritage;
314 this.print(node.superClass);
315 }
316
317 this.space();
318 this.print(node.body);
319}
320
321export { ClassBody as StructBody };

Callers

nothing calls this directly

Calls 3

wordMethod · 0.45
spaceMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected