MCPcopy Index your code
hub / github.com/CoderLine/alphaTab / writeInvocationExpression

Function writeInvocationExpression

packages/transpiler/src/AstPrinterBase.ts:249–280  ·  view source on GitHub ↗
(expr: cs.InvocationExpression)

Source from the content-addressed store, hash-verified

247 }
248
249 protected writeInvocationExpression(expr: cs.InvocationExpression) {
250 this.writeExpression(expr.expression);
251 if (expr.typeArguments) {
252 this.write('<');
253 this.writeCommaSeparated(expr.typeArguments, t => this.writeType(t));
254 this.write('>');
255 }
256
257 if (expr.nullSafe) {
258 this.write('?.');
259 this.write(this._context.toMethodNameCase('invoke'));
260 }
261
262 this.write('(');
263 if (expr.arguments.length > 5) {
264 this.writeLine();
265 this._indent++;
266 this.writeCommaSeparated(
267 expr.arguments,
268 a => {
269 this.writeExpression(a);
270 this.writeLine();
271 },
272 true
273 );
274 this._indent--;
275 this.writeLine();
276 } else {
277 this.writeCommaSeparated(expr.arguments, a => this.writeExpression(a));
278 }
279 this.write(')');
280 }
281
282 protected writeNullLiteral(_expr: cs.NullLiteral) {
283 this.write('null');

Callers

nothing calls this directly

Calls 4

writeLineMethod · 0.80
writeMethod · 0.65
writeTypeMethod · 0.45
toMethodNameCaseMethod · 0.45

Tested by

no test coverage detected