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

Function visitAllWithSiblings

packages/compiler/src/ml_parser/html_whitespaces.ts:296–307  ·  view source on GitHub ↗
(visitor: WhitespaceVisitor, nodes: html.Node[])

Source from the content-addressed store, hash-verified

294}
295
296export function visitAllWithSiblings(visitor: WhitespaceVisitor, nodes: html.Node[]): any[] {
297 const result: any[] = [];
298
299 nodes.forEach((ast, i) => {
300 const context: SiblingVisitorContext = {prev: nodes[i - 1], next: nodes[i + 1]};
301 const astResult = ast.visit(visitor, context);
302 if (astResult) {
303 result.push(astResult);
304 }
305 });
306 return result;
307}

Callers 8

parseR3Function · 0.90
updateFromTemplateMethod · 0.90
_visitElementLikeMethod · 0.90
visitElementMethod · 0.85
visitExpansionMethod · 0.85
visitExpansionCaseMethod · 0.85
visitBlockMethod · 0.85
removeWhitespacesFunction · 0.85

Calls 3

visitMethod · 0.65
forEachMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected