@Override
 public Void visitBinary(final BinaryTree tree, final Void p) {
   JCBinary assign = (JCBinary) tree;
   assign.lhs = replace(assign.lhs);
   assign.rhs = replace(assign.rhs);
   return super.visitBinary(tree, p);
 }
示例#2
0
 public void visitBinary(JCBinary tree) {
   try {
     int ownprec = TreeInfo.opPrec(tree.getTag());
     String opname = operatorName(tree.getTag());
     open(prec, ownprec);
     printExpr(tree.lhs, ownprec);
     print(" " + opname + " ");
     printExpr(tree.rhs, ownprec + 1);
     close(prec, ownprec);
   } catch (IOException e) {
     throw new UncheckedIOException(e);
   }
 }
 public void visitBinary(JCBinary node) {
   node.operator = null;
   super.visitBinary(node);
 }
示例#4
0
 public JCTree visitBinary(BinaryTree node, P p) {
   JCBinary t = (JCBinary) node;
   JCExpression lhs = copy(t.lhs, p);
   JCExpression rhs = copy(t.rhs, p);
   return M.at(t.pos).Binary(t.getTag(), lhs, rhs);
 }