From d3905474c9c84da4a789f6dc40aa1ae7d0bfaf2a Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 14 Dec 2018 20:53:00 -0800 Subject: Removed EOL comments --- nomsu_decompiler.moon | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nomsu_decompiler.moon') 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 -- cgit v1.2.3