Compared to the reference pretty-print solution, our output still lacks some parentheses around certain Expressions. I tried adding them but could not pinpoint the exact spot where they need to be added. Can anyone help please?
Our output (red) as of 723894e38247a40b22b3198dc8ee9167bb8f120f compared to what it should look like:
--- Our output
+++ HelloWord-output.mj
@@ -3,15 +3,15 @@
return c = (a + b);
}
public static void main(String[] args) {
- System.out.println((43110 + 0));
+ (System.out).println(43110 + 0);
boolean b = true && (!false);
- if (23 + 19 == (42 + 0) * 1)
+ if ((23 + 19) == ((42 + 0) * 1))
b = (0 < 1);
- else if (!array[2 + 2]) {
+ else if (!(array[2 + 2])) {
int x = 0;
- x = x + 1;
+ x = (x + 1);
} else {
- (new HelloWorld()).bar(42 + 0 * 1, -1);
+ (new HelloWorld()).bar(42 + (0 * 1), -1);
}
}
public boolean[] array;
Compared to the reference pretty-print solution, our output still lacks some parentheses around certain Expressions. I tried adding them but could not pinpoint the exact spot where they need to be added. Can anyone help please?
Our output (red) as of 723894e38247a40b22b3198dc8ee9167bb8f120f compared to what it should look like: