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

Class RecurseVisitor

packages/compiler/src/i18n/i18n_ast.ts:254–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252
253// Visit all the nodes recursively
254export class RecurseVisitor implements Visitor {
255 visitText(text: Text, context?: any): any {}
256
257 visitContainer(container: Container, context?: any): any {
258 container.children.forEach((child) => child.visit(this));
259 }
260
261 visitIcu(icu: Icu, context?: any): any {
262 Object.keys(icu.cases).forEach((k) => {
263 icu.cases[k].visit(this);
264 });
265 }
266
267 visitTagPlaceholder(ph: TagPlaceholder, context?: any): any {
268 ph.children.forEach((child) => child.visit(this));
269 }
270
271 visitPlaceholder(ph: Placeholder, context?: any): any {}
272
273 visitIcuPlaceholder(ph: IcuPlaceholder, context?: any): any {}
274
275 visitBlockPlaceholder(ph: BlockPlaceholder, context?: any): any {
276 ph.children.forEach((child) => child.visit(this));
277 }
278}
279
280/**
281 * Serialize the message to the Localize backtick string format that would appear in compiled code.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected