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

Class RecursiveAstVisitor

packages/compiler/src/expression_parser/ast.ts:725–831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected