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

Method visit

packages/language-service/src/template_target.ts:725–742  ·  view source on GitHub ↗
(node: AST, path: Array<TmplAstNode | AST>)

Source from the content-addressed store, hash-verified

723 }
724
725 override visit(node: AST, path: Array<TmplAstNode | AST>) {
726 if (node instanceof ASTWithSource) {
727 // In order to reduce noise, do not include `ASTWithSource` in the path.
728 // For the purpose of source spans, there is no difference between
729 // `ASTWithSource` and underlying node that it wraps.
730 node = node.ast;
731 }
732 // The third condition is to account for the implicit receiver, which should
733 // not be visited.
734 if (
735 isWithin(this.position, node.sourceSpan) &&
736 !(node instanceof ImplicitReceiver) &&
737 !(node instanceof ThisReceiver)
738 ) {
739 path.push(node);
740 node.visit(this, path);
741 }
742 }
743}
744
745function getSpanIncludingEndTag(ast: TmplAstNode) {

Callers 1

visitBindingMethod · 0.95

Calls 3

isWithinFunction · 0.90
visitMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected