mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 17:30:46 +00:00
Fixed #1807 Proper parenthesis around call inside another call
This commit is contained in:
+9
-2
@@ -53,11 +53,18 @@ public class ConstructAVM2Item extends AVM2Item {
|
||||
return object.toString(writer, localData);
|
||||
}
|
||||
writer.append("new ");
|
||||
if (object.getPrecedence() > getPrecedence()) {
|
||||
|
||||
boolean objectIsCall = (object instanceof CallAVM2Item) ||
|
||||
(object instanceof CallPropertyAVM2Item) ||
|
||||
(object instanceof CallMethodAVM2Item) ||
|
||||
(object instanceof CallStaticAVM2Item) ||
|
||||
(object instanceof CallSuperAVM2Item);
|
||||
|
||||
if (object.getPrecedence() > getPrecedence() || objectIsCall) {
|
||||
writer.append("(");
|
||||
}
|
||||
object.toString(writer, localData);
|
||||
if (object.getPrecedence() > getPrecedence()) {
|
||||
if (object.getPrecedence() > getPrecedence() || objectIsCall) {
|
||||
writer.append(")");
|
||||
}
|
||||
writer.spaceBeforeCallParenthesies(args.size());
|
||||
|
||||
Reference in New Issue
Block a user