From 4f53ea5cc47ad58680bff1981cf111ef6b169af3 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 30 Jul 2018 15:12:11 -0700 Subject: Cleaning up clumping logic a little. --- nomsu_compiler.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'nomsu_compiler.lua') diff --git a/nomsu_compiler.lua b/nomsu_compiler.lua index c338e8e..6692fe3 100644 --- a/nomsu_compiler.lua +++ b/nomsu_compiler.lua @@ -1048,7 +1048,7 @@ do local nomsu = NomsuCode(tree.source, pop_comments(tree.source.start)) local should_clump should_clump = function(prev_line, line) - if prev_line and prev_line.type == "Action" and line.type == "Action" then + if prev_line.type == "Action" and line.type == "Action" then if prev_line.stub == "use %" then return line.stub == "use %" end @@ -1058,11 +1058,8 @@ do if line.stub == "test %" then return false end - if recurse(prev_line):is_multiline() then - return false - end end - return true + return not recurse(prev_line):is_multiline() end for chunk_no, chunk in ipairs(tree) do if chunk_no > 1 then -- cgit v1.2.3