From 171e9d674e4ae85e303c90679ad47bceda3b3810 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 11 Nov 2018 18:28:10 -0800 Subject: Re-implemented nomsu -> lua comment translation and added file chunk comments. --- nomsu_compiler.moon | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'nomsu_compiler.moon') diff --git a/nomsu_compiler.moon b/nomsu_compiler.moon index c71ee1d..497d210 100644 --- a/nomsu_compiler.moon +++ b/nomsu_compiler.moon @@ -270,10 +270,6 @@ compile = setmetatable({ i += 1 lua\append "\n return comprehension\nend)()" return lua - --lua = LuaCode\from tree.source, "#{tree.type}{" - --lua\concat_append([compile(e) for e in *tree when e.type != 'Comment'], ", ", ",\n ") - --lua\append "}" - --return lua when "DictEntry" key, value = tree[1], tree[2] @@ -323,8 +319,7 @@ compile = setmetatable({ "compilation depends on the earlier chunks") when "Comment" - -- TODO: implement? - return LuaCode\from(tree.source, "") + return LuaCode\from(tree.source, "-- ", (tree[1]\gsub('\n', '\n-- '))) when "Error" error("Can't compile errors") -- cgit v1.2.3