(ctx: PrintContext)
| 406 | } |
| 407 | |
| 408 | override print(ctx: PrintContext) { |
| 409 | this.type.markUsed(ctx); |
| 410 | const returnType = this.returnType.print(ctx); |
| 411 | const fullParameters = ParameterDeclaration.printParameters(ctx, this.parameters); |
| 412 | const shortParameters = this.parameters.map(p => p.type.print(ctx)).join(', '); |
| 413 | const body = this.body?.print(ctx) ?? '{}'; |
| 414 | const lambda = `[=](${fullParameters}) -> ${returnType} ${body}`; |
| 415 | const closure = this.closure.map(c => c.print(ctx)); |
| 416 | return `compilets::MakeFunction<${returnType}(${shortParameters})>(${[ lambda, ...closure ].join(', ')})`; |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | // Represent the arguments of a call-like expression. |
nothing calls this directly
no test coverage detected