aboutsummaryrefslogtreecommitdiff
path: root/nomsu_decompiler.lua
diff options
context:
space:
mode:
Diffstat (limited to 'nomsu_decompiler.lua')
-rw-r--r--nomsu_decompiler.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/nomsu_decompiler.lua b/nomsu_decompiler.lua
index f6552b8..3f3702c 100644
--- a/nomsu_decompiler.lua
+++ b/nomsu_decompiler.lua
@@ -94,12 +94,18 @@ tree_to_inline_nomsu = function(tree)
target_nomsu:parenthesize()
end
local nomsu = NomsuCode:from(tree.source, target_nomsu, ", ")
+ if #tree > 2 then
+ nomsu:add("(")
+ end
for i = 2, #tree do
if i > 2 then
nomsu:add("; ")
end
nomsu:add(tree_to_inline_nomsu(tree[i]))
end
+ if #tree > 2 then
+ nomsu:add(")")
+ end
return nomsu
elseif "EscapedNomsu" == _exp_0 then
local inner_nomsu = tree_to_inline_nomsu(tree[1])