@Override public void visit(final ConditionalExpr n, final A arg) { visitComment(n.getComment(), arg); n.getCondition().accept(this, arg); n.getThenExpr().accept(this, arg); n.getElseExpr().accept(this, arg); }
@Override public void visit(final ConditionalExpr n, final Object arg) { printJavaComment(n.getComment(), arg); n.getCondition().accept(this, arg); printer.print(" ? "); n.getThenExpr().accept(this, arg); printer.print(" : "); n.getElseExpr().accept(this, arg); }
@Override public Node visit(ConditionalExpr _n, Object _arg) { Expression condition = cloneNodes(_n.getCondition(), _arg); Expression thenExpr = cloneNodes(_n.getThenExpr(), _arg); Expression elseExpr = cloneNodes(_n.getElseExpr(), _arg); Comment comment = cloneNodes(_n.getComment(), _arg); ConditionalExpr r = new ConditionalExpr( _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(), condition, thenExpr, elseExpr ); r.setComment(comment); return r; }