Exemple #1
0
 /**
  * Prints out a sequences of expressions with commas, and optionally handling multiple expressions
  * and return value adjustment.
  */
 public static void printSequence(
     Decompiler d, Output out, List<Expression> exprs, boolean linebreak, boolean multiple) {
   int n = exprs.size();
   int i = 1;
   for (Expression expr : exprs) {
     boolean last = (i == n);
     if (expr.isMultiple()) {
       last = true;
     }
     if (last) {
       if (multiple) {
         expr.printMultiple(d, out);
       } else {
         expr.print(d, out);
       }
       break;
     } else {
       expr.print(d, out);
       out.print(",");
       if (linebreak) {
         out.println();
       } else {
         out.print(" ");
       }
     }
     i++;
   }
 }
Exemple #2
0
 protected static void printBinary(
     Decompiler d, Output out, String op, Expression left, Expression right) {
   left.print(d, out);
   out.print(" ");
   out.print(op);
   out.print(" ");
   right.print(d, out);
 }
Exemple #3
0
 protected static void printUnary(Decompiler d, Output out, String op, Expression expression) {
   out.print(op);
   expression.print(d, out);
 }