diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-11-17 14:38:05 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-11-17 14:39:08 -0800 |
| commit | 7f47d4204039258cec78c767f489b7809b4257ff (patch) | |
| tree | c8533068b75ab453accfe1f688705e9e94c9e279 /nomsu_decompiler.moon | |
| parent | 34a3dd22a4e132bd4e0fe3ce89831c3fe761d3d9 (diff) | |
In-progress (but working) overhaul of some elements including: function
calls, lib/thing.nom API, multi-assignments, varargs, etc.
Diffstat (limited to 'nomsu_decompiler.moon')
| -rw-r--r-- | nomsu_decompiler.moon | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nomsu_decompiler.moon b/nomsu_decompiler.moon index 5b6c89e..31647aa 100644 --- a/nomsu_decompiler.moon +++ b/nomsu_decompiler.moon @@ -58,6 +58,8 @@ tree_to_inline_nomsu = (tree)-> if bit.type == "Action" arg_nomsu\parenthesize! nomsu\append arg_nomsu + if #tree == 1 and type(tree[1]) != "string" + nomsu\append "()" return nomsu when "EscapedNomsu" @@ -251,6 +253,11 @@ tree_to_nomsu = (tree)-> elseif word_buffer[1] == "'" next_space = "" nomsu\append next_space, words + next_space = " " + + if #tree == 1 and type(tree[1]) != "string" + if next_space == " " then next_space = "" + nomsu\append next_space, "()" return nomsu |
