aboutsummaryrefslogtreecommitdiff
path: root/nomsu_compiler.lua
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-01-01 17:15:51 -0800
committerBruce Hill <bruce@bruce-hill.com>2019-01-01 17:17:23 -0800
commit3e89092833a6d407e711fe4ae5f44474ff34cf64 (patch)
tree5ffe2df86f648b604347b59999992d74f71a796c /nomsu_compiler.lua
parente68eb04d690454428216a0f0f1b11399feeb7dc1 (diff)
Some changes to the error API, a fix for statement block parsing, and
replacing ((foo 1 baz)'s meaning) with $(foo 1 baz).
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 c9f8fd6..cbe0c61 100644
--- a/nomsu_compiler.lua
+++ b/nomsu_compiler.lua
@@ -473,12 +473,7 @@ local compile = setmetatable({
elseif "Number" == _exp_0 then
return LuaCode:from(tree.source, tostring(tree[1]))
elseif "Var" == _exp_0 then
- if type(tree[1]) == 'string' then
- return LuaCode:from(tree.source, (concat(tree, " ")):as_lua_id())
- else
- assert(tree[1].type == 'Action')
- return LuaCode:from(tree.source, tree[1]:get_stub():as_lua_id())
- end
+ return LuaCode:from(tree.source, tree:as_var():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