aboutsummaryrefslogtreecommitdiff
path: root/nomsu_compiler.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-30 15:12:11 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-30 15:12:19 -0700
commit4f53ea5cc47ad58680bff1981cf111ef6b169af3 (patch)
tree77a4dd9a936609451d692835463d102d0bf86c67 /nomsu_compiler.moon
parentab4ebdf1751158391100efb0002f40b1d7f6314c (diff)
Cleaning up clumping logic a little.
Diffstat (limited to 'nomsu_compiler.moon')
-rw-r--r--nomsu_compiler.moon5
1 files changed, 2 insertions, 3 deletions
diff --git a/nomsu_compiler.moon b/nomsu_compiler.moon
index b48a8f7..0b3ae7c 100644
--- a/nomsu_compiler.moon
+++ b/nomsu_compiler.moon
@@ -650,12 +650,11 @@ with NomsuCompiler
when "FileChunks"
nomsu = NomsuCode(tree.source, pop_comments(tree.source.start))
should_clump = (prev_line, line)->
- if prev_line and prev_line.type == "Action" and line.type == "Action"
+ if prev_line.type == "Action" and line.type == "Action"
if prev_line.stub == "use %" then return line.stub == "use %"
if prev_line.stub == "test %" then return true
if line.stub == "test %" then return false
- return false if recurse(prev_line)\is_multiline!
- return true
+ return not recurse(prev_line)\is_multiline!
for chunk_no, chunk in ipairs tree
nomsu\append "\n\n#{("~")\rep(80)}\n\n" if chunk_no > 1
nomsu\append pop_comments(chunk.source.start)