예제 #1
0
 public void visitAssignop(JCAssignOp tree) {
   try {
     open(prec, TreeInfo.assignopPrec);
     printExpr(tree.lhs, TreeInfo.assignopPrec + 1);
     print(" " + operatorName(tree.getTag() - JCTree.ASGOffset) + "= ");
     printExpr(tree.rhs, TreeInfo.assignopPrec);
     close(prec, TreeInfo.assignopPrec);
   } catch (IOException e) {
     throw new UncheckedIOException(e);
   }
 }
예제 #2
0
 public JCTree visitCompoundAssignment(CompoundAssignmentTree node, P p) {
   JCAssignOp t = (JCAssignOp) node;
   JCTree lhs = copy(t.lhs, p);
   JCTree rhs = copy(t.rhs, p);
   return M.at(t.pos).Assignop(t.getTag(), lhs, rhs);
 }