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

Function StructDeclaration

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

Source from the content-addressed store, hash-verified

296}
297
298export function StructDeclaration(this: Printer, node: t.StructDeclaration) {
299 this.word("struct", true);
300
301 if (node.id) {
302 this.space();
303 this.print(node.id);
304 }
305
306 if (node.superClass) {
307 this.space();
308 this.word("extends");
309 this.space();
310 this.print(node.superClass);
311 }
312
313 this.space();
314 this.print(node.body);
315}
316
317export { 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