@Override
  protected void visitExprNode(ExprNode node) {

    if (!(node instanceof ParentExprNode)) {
      return;
    }
    ParentExprNode nodeAsParent = (ParentExprNode) node;

    // Recurse.
    visitChildren(nodeAsParent);

    // If all children are constants, we attempt to preevaluate this node and replace it with a
    // constant.
    for (ExprNode child : nodeAsParent.getChildren()) {
      if (!isConstant(child)) {
        return; // cannot preevaluate
      }
    }
    attemptPreeval(nodeAsParent);
  }
@ Override protected void visitExprNode ( ExprNode node ) { if ( ! ( node instanceof ParentExprNode ) ) { return ; } ParentExprNode nodeAsParent = ( ParentExprNode ) node ; visitChildren ( nodeAsParent ) ; for ( ExprNode child : nodeAsParent . getChildren ( ) ) { if ( ! isConstant ( child ) ) { return ; } } attemptPreeval ( nodeAsParent ) ; }
Fallback implementation.