aboutsummaryrefslogtreecommitdiff
path: root/nomsu_decompiler.moon
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-01-25 15:01:29 -0800
committerBruce Hill <bruce@bruce-hill.com>2019-01-25 15:01:47 -0800
commit1713a0e38f12f8ed167575ac5a84a0eb8dd59a44 (patch)
tree8601e019689be4a819d208ee2d0b13e717893c51 /nomsu_decompiler.moon
parent364f3c894b34e20c72f3d7ff273d2519affd9963 (diff)
Fixed untested codepath for generating ($x, (foo; baz))
Diffstat (limited to 'nomsu_decompiler.moon')
-rw-r--r--nomsu_decompiler.moon2
1 files changed, 2 insertions, 0 deletions
diff --git a/nomsu_decompiler.moon b/nomsu_decompiler.moon
index 4c733f5..b588e1e 100644
--- a/nomsu_decompiler.moon
+++ b/nomsu_decompiler.moon
@@ -64,9 +64,11 @@ tree_to_inline_nomsu = (tree)->
if tree[1].type == "Block"
target_nomsu\parenthesize!
nomsu = NomsuCode\from(tree.source, target_nomsu, ", ")
+ if #tree > 2 then nomsu\add "("
for i=2,#tree
nomsu\add "; " if i > 2
nomsu\add tree_to_inline_nomsu(tree[i])
+ if #tree > 2 then nomsu\add ")"
return nomsu
when "EscapedNomsu"