diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-25 15:01:29 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-25 15:01:47 -0800 |
| commit | 1713a0e38f12f8ed167575ac5a84a0eb8dd59a44 (patch) | |
| tree | 8601e019689be4a819d208ee2d0b13e717893c51 /nomsu_decompiler.lua | |
| parent | 364f3c894b34e20c72f3d7ff273d2519affd9963 (diff) | |
Fixed untested codepath for generating ($x, (foo; baz))
Diffstat (limited to 'nomsu_decompiler.lua')
| -rw-r--r-- | nomsu_decompiler.lua | 6 |
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]) |
