diff options
Diffstat (limited to 'nomsu_decompiler.moon')
| -rw-r--r-- | nomsu_decompiler.moon | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nomsu_decompiler.moon b/nomsu_decompiler.moon index 9cb9ae8..f8c2aa3 100644 --- a/nomsu_decompiler.moon +++ b/nomsu_decompiler.moon @@ -173,6 +173,8 @@ tree_to_nomsu = (tree)-> space = MAX_LINE - nomsu\trailing_line_len! try_inline = true for subtree in coroutine.wrap(-> (t\map(coroutine.yield) and nil)) + if subtree.type == "Comment" + try_inline = false if subtree.type == "Block" if #subtree > 1 try_inline = false @@ -356,6 +358,7 @@ tree_to_nomsu = (tree)-> if #item_nomsu\text! > MAX_LINE item_nomsu = recurse(item) if item.type == 'Comment' + sep = '\n' item_nomsu = tree_to_nomsu(item) nomsu\add sep nomsu\add item_nomsu |
