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

Function visitLiteralExpr

packages/compiler/src/output/abstract_emitter.ts:356–364  ·  view source on GitHub ↗
(ast: o.LiteralExpr, ctx: EmitterVisitorContext)

Source from the content-addressed store, hash-verified

354 }
355
356 visitLiteralExpr(ast: o.LiteralExpr, ctx: EmitterVisitorContext): void {
357 this.printLeadingComments(ast, ctx);
358 const value = ast.value;
359 if (typeof value === 'string') {
360 ctx.print(ast, escapeIdentifier(value)!);
361 } else {
362 ctx.print(ast, `${value}`);
363 }
364 }
365
366 visitRegularExpressionLiteral(
367 ast: o.RegularExpressionLiteralExpr,

Callers

nothing calls this directly

Calls 2

escapeIdentifierFunction · 0.85
printMethod · 0.45

Tested by

no test coverage detected