mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-09 06:13:16 +00:00
AS3: precedence parentheses - call, new
This commit is contained in:
@@ -50,6 +50,10 @@ public class CallTreeItem extends TreeItem {
|
||||
if (receiver instanceof ThisTreeItem) {
|
||||
recPart = "";
|
||||
}*/
|
||||
return function.toString(constants, localRegNames, fullyQualifiedNames) + hilight("(") + args + hilight(")");
|
||||
String fstr = function.toString(constants, localRegNames, fullyQualifiedNames);
|
||||
if (function.precedence > precedence) {
|
||||
fstr = "(" + fstr + ")";
|
||||
}
|
||||
return fstr + hilight("(") + args + hilight(")");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,11 @@ public class ConstructTreeItem extends TreeItem {
|
||||
if (object instanceof NewFunctionTreeItem) {
|
||||
return object.toString(constants, localRegNames, fullyQualifiedNames);
|
||||
}
|
||||
return hilight("new ") + object.toString(constants, localRegNames, fullyQualifiedNames) + hilight("(") + argStr + hilight(")");
|
||||
String obStr = object.toString(constants, localRegNames, fullyQualifiedNames);
|
||||
if (object.precedence > precedence) {
|
||||
obStr = "(" + obStr + ")";
|
||||
}
|
||||
return hilight("new ") + obStr + hilight("(") + argStr + hilight(")");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user