diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-01 15:52:56 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-01 15:53:21 -0800 |
| commit | a82b0d9d2435cca72629c1e5e73cdcb89f728ac0 (patch) | |
| tree | 638cd1b321dde44e200d3346e5b6fd0152774470 /nomsu_compiler.moon | |
| parent | b6d3cbd61cd08e39d20a569b7c5ece6bb25897dd (diff) | |
Added support for $(foo 1 baz 2) as a way to access (foo 1 baz 2)'s
meaning.
Diffstat (limited to 'nomsu_compiler.moon')
| -rw-r--r-- | nomsu_compiler.moon | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nomsu_compiler.moon b/nomsu_compiler.moon index 45e863d..0602f63 100644 --- a/nomsu_compiler.moon +++ b/nomsu_compiler.moon @@ -370,7 +370,11 @@ compile = setmetatable({ return LuaCode\from(tree.source, tostring(tree[1])) when "Var" - return LuaCode\from(tree.source, (concat(tree, " "))\as_lua_id!) + if type(tree[1]) == 'string' + 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!) when "FileChunks" error("Can't convert FileChunks to a single block of lua, since each chunk's ".. |
