aboutsummaryrefslogtreecommitdiff
path: root/nomsu_compiler.lua
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.lua
parent0b082397bb0366a5af250bdf1c757e0c26571de6 (diff)
Tweaks and tidying.
Diffstat (limited to 'nomsu_compiler.lua')
-rw-r--r--nomsu_compiler.lua7
1 files changed, 1 insertions, 6 deletions
diff --git a/nomsu_compiler.lua b/nomsu_compiler.lua
index a83f4ec..5a840ea 100644
--- a/nomsu_compiler.lua
+++ b/nomsu_compiler.lua
@@ -68,11 +68,6 @@ compile_error = function(source, err_msg, hint)
})
return error(err_str, 0)
end
-local tree_to_nomsu, tree_to_inline_nomsu
-do
- local _obj_0 = require("nomsu_decompiler")
- tree_to_nomsu, tree_to_inline_nomsu = _obj_0.tree_to_nomsu, _obj_0.tree_to_inline_nomsu
-end
local math_expression = re.compile([[ (([*/^+-] / [0-9]+) " ")* [*/^+-] !. ]])
local MAX_LINE = 80
local compile = setmetatable({
@@ -434,7 +429,7 @@ local compile = setmetatable({
elseif "Number" == _exp_0 then
return LuaCode:from(tree.source, tostring(tree[1]))
elseif "Var" == _exp_0 then
- return LuaCode:from(tree.source, (tree[1]):as_lua_id())
+ return LuaCode:from(tree.source, (concat(tree, " ")):as_lua_id())
elseif "FileChunks" == _exp_0 then
return error("Can't convert FileChunks to a single block of lua, since each chunk's " .. "compilation depends on the earlier chunks")
elseif "Comment" == _exp_0 then