diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-12-14 20:53:00 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-12-14 20:54:18 -0800 |
| commit | d3905474c9c84da4a789f6dc40aa1ae7d0bfaf2a (patch) | |
| tree | fcf0e2361b7a877ca2ddb0112bfb14a7e1ea1cfa /nomsu_decompiler.moon | |
| parent | d30f6a397d274b0b942bdd2e2648b42538f1cbe2 (diff) | |
Removed EOL comments
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 |
