(node: AST, path: Array<TmplAstNode | AST>)
| 657 | } |
| 658 | |
| 659 | override visit(node: AST, path: Array<TmplAstNode | AST>) { |
| 660 | if (node instanceof ASTWithSource) { |
| 661 | // In order to reduce noise, do not include `ASTWithSource` in the path. |
| 662 | // For the purpose of source spans, there is no difference between |
| 663 | // `ASTWithSource` and underlying node that it wraps. |
| 664 | node = node.ast; |
| 665 | } |
| 666 | // The third condition is to account for the implicit receiver, which should |
| 667 | // not be visited. |
| 668 | if ( |
| 669 | isWithin(this.position, node.sourceSpan) && |
| 670 | !(node instanceof ImplicitReceiver) && |
| 671 | !(node instanceof ThisReceiver) |
| 672 | ) { |
| 673 | path.push(node); |
| 674 | node.visit(this, path); |
| 675 | } |
| 676 | } |
| 677 | } |
| 678 | |
| 679 | function getSpanIncludingEndTag(ast: TmplAstNode) { |
no test coverage detected