MCPcopy Create free account
hub / github.com/compilets/compilets / print

Method print

src/cpp-syntax.ts:1016–1027  ·  view source on GitHub ↗
(ctx: PrintContext)

Source from the content-addressed store, hash-verified

1014
1015export class Block extends Paragraph<Statement> {
1016 override print(ctx: PrintContext) {
1017 if (this.statements?.length > 0) {
1018 ctx.level++;
1019 ctx.concatenateNextLine = false;
1020 let result = `{\n${super.print(ctx)}`;
1021 ctx.level--;
1022 result += `\n${ctx.padding}}`;
1023 return result;
1024 } else {
1025 return '{}';
1026 }
1027 }
1028}
1029
1030export class ExpressionStatement extends Statement {

Callers 15

castExpressionFunction · 0.45
strictCastExpressionFunction · 0.45
castArgumentsFunction · 0.45
castUnionFunction · 0.45
castOptionalFunction · 0.45
printMethod · 0.45
printMethod · 0.45
printMethod · 0.45
printMethod · 0.45
printMethod · 0.45
printMethod · 0.45
printMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected