MCPcopy Index your code
hub / github.com/angular/angular / visitAll

Function visitAll

packages/compiler/src/ml_parser/ast.ts:243–256  ·  view source on GitHub ↗
(visitor: Visitor, nodes: Node[], context: any = null)

Source from the content-addressed store, hash-verified

241}
242
243export function visitAll(visitor: Visitor, nodes: Node[], context: any = null): any[] {
244 const result: any[] = [];
245
246 const visit = visitor.visit
247 ? (ast: Node) => visitor.visit!(ast, context) || ast.visit(visitor, context)
248 : (ast: Node) => ast.visit(visitor, context);
249 nodes.forEach((ast) => {
250 const astResult = visit(ast);
251 if (astResult) {
252 result.push(astResult);
253 }
254 });
255 return result;
256}
257
258export class RecursiveVisitor implements Visitor {
259 constructor() {}

Callers 15

extractBundleMethod · 0.90
visitElementMethod · 0.90
extractBundleMethod · 0.90
visitElementMethod · 0.90
visitUnitElementMethod · 0.90
extractBundleMethod · 0.90
serializeMethod · 0.90
visitElementMethod · 0.90
visitExpansionMethod · 0.90
visitExpansionCaseMethod · 0.90
visitContainedNodesMethod · 0.90
canRemoveCommonModuleFunction · 0.90

Calls 4

visitMethod · 0.65
visitFunction · 0.50
forEachMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…