MCPcopy Create free account
hub / github.com/angular/angular / visitInvokeFunctionExpr

Function visitInvokeFunctionExpr

packages/compiler/src/output/abstract_emitter.ts:313–328  ·  view source on GitHub ↗
(expr: o.InvokeFunctionExpr, ctx: EmitterVisitorContext)

Source from the content-addressed store, hash-verified

311 }
312
313 visitInvokeFunctionExpr(expr: o.InvokeFunctionExpr, ctx: EmitterVisitorContext): void {
314 this.printLeadingComments(expr, ctx);
315
316 const shouldParenthesize = this.shouldParenthesize(expr.fn, expr);
317
318 if (shouldParenthesize) {
319 ctx.print(expr.fn, '(');
320 }
321 expr.fn.visitExpression(this, ctx);
322 if (shouldParenthesize) {
323 ctx.print(expr.fn, ')');
324 }
325 ctx.print(expr, expr.isOptional ? '?.(' : '(');
326 this.visitAllExpressions(expr.args, ctx, ',');
327 ctx.print(expr, ')');
328 }
329
330 visitTaggedTemplateLiteralExpr(
331 expr: o.TaggedTemplateLiteralExpr,

Callers

nothing calls this directly

Calls 5

printLeadingCommentsMethod · 0.80
shouldParenthesizeMethod · 0.80
visitAllExpressionsMethod · 0.80
printMethod · 0.45
visitExpressionMethod · 0.45

Tested by

no test coverage detected