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