Function
StructDeclaration
(this: Printer, node: t.StructDeclaration)
Source from the content-addressed store, hash-verified
| 299 | } |
| 300 | |
| 301 | export 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 | |
| 321 | export { ClassBody as StructBody }; |
Callers
nothing calls this directly
Tested by
no test coverage detected