(ctx: PrintContext)
| 956 | } |
| 957 | |
| 958 | override print(ctx: PrintContext) { |
| 959 | const type = this.type as FunctionType; |
| 960 | type.markUsed(ctx); |
| 961 | const returnType = type.returnType.print(ctx); |
| 962 | const parameters = ParameterDeclaration.printParameters(ctx, this.parameters); |
| 963 | const templateDeclaration = printTemplateDeclaration(type); |
| 964 | let result = `${returnType} ${this.name}(${parameters})`; |
| 965 | if (ctx.mode == 'impl' || (ctx.mode == 'header' && templateDeclaration)) |
| 966 | result += ' ' + (this.body?.print(ctx) ?? '{}'); |
| 967 | else |
| 968 | result += ';'; |
| 969 | if (templateDeclaration) |
| 970 | return templateDeclaration + '\n' + result; |
| 971 | return result; |
| 972 | } |
| 973 | } |
| 974 | |
| 975 | export class VariableStatement extends DeclarationStatement { |
nothing calls this directly
no test coverage detected