| 727 | } |
| 728 | |
| 729 | export class RecursiveAstVisitor implements AstVisitor { |
| 730 | visit(ast: AST, context?: any): any { |
| 731 | // The default implementation just visits every node. |
| 732 | // Classes that extend RecursiveAstVisitor should override this function |
| 733 | // to selectively visit the specified node. |
| 734 | ast.visit(this, context); |
| 735 | } |
| 736 | visitUnary(ast: Unary, context: any): any { |
| 737 | this.visit(ast.expr, context); |
| 738 | } |
| 739 | visitBinary(ast: Binary, context: any): any { |
| 740 | this.visit(ast.left, context); |
| 741 | this.visit(ast.right, context); |
| 742 | } |
| 743 | visitChain(ast: Chain, context: any): any { |
| 744 | this.visitAll(ast.expressions, context); |
| 745 | } |
| 746 | visitConditional(ast: Conditional, context: any): any { |
| 747 | this.visit(ast.condition, context); |
| 748 | this.visit(ast.trueExp, context); |
| 749 | this.visit(ast.falseExp, context); |
| 750 | } |
| 751 | visitPipe(ast: BindingPipe, context: any): any { |
| 752 | this.visit(ast.exp, context); |
| 753 | this.visitAll(ast.args, context); |
| 754 | } |
| 755 | visitImplicitReceiver(ast: ThisReceiver, context: any): any {} |
| 756 | visitThisReceiver(ast: ThisReceiver, context: any): any {} |
| 757 | visitInterpolation(ast: Interpolation, context: any): any { |
| 758 | this.visitAll(ast.expressions, context); |
| 759 | } |
| 760 | visitKeyedRead(ast: KeyedRead, context: any): any { |
| 761 | this.visit(ast.receiver, context); |
| 762 | this.visit(ast.key, context); |
| 763 | } |
| 764 | visitLiteralArray(ast: LiteralArray, context: any): any { |
| 765 | this.visitAll(ast.expressions, context); |
| 766 | } |
| 767 | visitLiteralMap(ast: LiteralMap, context: any): any { |
| 768 | this.visitAll(ast.values, context); |
| 769 | } |
| 770 | visitLiteralPrimitive(ast: LiteralPrimitive, context: any): any {} |
| 771 | visitPrefixNot(ast: PrefixNot, context: any): any { |
| 772 | this.visit(ast.expression, context); |
| 773 | } |
| 774 | visitTypeofExpression(ast: TypeofExpression, context: any) { |
| 775 | this.visit(ast.expression, context); |
| 776 | } |
| 777 | visitVoidExpression(ast: VoidExpression, context: any) { |
| 778 | this.visit(ast.expression, context); |
| 779 | } |
| 780 | visitNonNullAssert(ast: NonNullAssert, context: any): any { |
| 781 | this.visit(ast.expression, context); |
| 782 | } |
| 783 | visitPropertyRead(ast: PropertyRead, context: any): any { |
| 784 | this.visit(ast.receiver, context); |
| 785 | } |
| 786 | visitSafePropertyRead(ast: SafePropertyRead, context: any): any { |
nothing calls this directly
no outgoing calls
no test coverage detected