public static < R > void execOnAllV2Exprs ( SoyNode node , final AbstractNodeVisitor < ExprNode , R > exprNodeVisitor ) { visitAllNodes ( node , new NodeVisitor < Node , VisitDirective > ( ) { @ Override public VisitDirective exec ( Node node ) { if ( node instanceof ExprHolderNode ) { for ( ExprRootNode expr : ( ( ExprHolderNode ) node ) . getExprList ( ) ) { exprNodeVisitor . exec ( expr ) ; } } else if ( node instanceof ExprNode ) { return VisitDirective . SKIP_CHILDREN ; } return VisitDirective . CONTINUE ; } } ) ; }
Given a Soy node and a visitor for expression trees traverses the subtree of the node and executes the visitor on all expressions held by nodes in the subtree .