aboutsummaryrefslogtreecommitdiff
path: root/nomsu_compiler.moon
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-11-23 17:22:22 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-11-23 17:22:29 -0800
commit1a794c64871fa044c3024a7771ee4123e800d3b2 (patch)
treed4a9b215995365a037a67827db32856d4248e1c2 /nomsu_compiler.moon
parent0b082397bb0366a5af250bdf1c757e0c26571de6 (diff)
Tweaks and tidying.
Diffstat (limited to 'nomsu_compiler.moon')
-rw-r--r--nomsu_compiler.moon3
1 files changed, 1 insertions, 2 deletions
diff --git a/nomsu_compiler.moon b/nomsu_compiler.moon
index 794d87b..3600e60 100644
--- a/nomsu_compiler.moon
+++ b/nomsu_compiler.moon
@@ -41,7 +41,6 @@ compile_error = (source, err_msg, hint=nil)->
start:source.start, stop:source.stop, filename:source.filename
}
error(err_str, 0)
-{:tree_to_nomsu, :tree_to_inline_nomsu} = require "nomsu_decompiler"
-- This is a bit of a hack, but this code handles arbitrarily complex
-- math expressions like 2*x + 3^2 without having to define a single
@@ -322,7 +321,7 @@ compile = setmetatable({
return LuaCode\from(tree.source, tostring(tree[1]))
when "Var"
- return LuaCode\from(tree.source, (tree[1])\as_lua_id!)
+ return LuaCode\from(tree.source, (concat(tree, " "))\as_lua_id!)
when "FileChunks"
error("Can't convert FileChunks to a single block of lua, since each chunk's "..