aboutsummaryrefslogtreecommitdiff
path: root/nomsu_decompiler.lua
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-01-01 15:52:56 -0800
committerBruce Hill <bruce@bruce-hill.com>2019-01-01 15:53:21 -0800
commita82b0d9d2435cca72629c1e5e73cdcb89f728ac0 (patch)
tree638cd1b321dde44e200d3346e5b6fd0152774470 /nomsu_decompiler.lua
parentb6d3cbd61cd08e39d20a569b7c5ece6bb25897dd (diff)
Added support for $(foo 1 baz 2) as a way to access (foo 1 baz 2)'s
meaning.
Diffstat (limited to 'nomsu_decompiler.lua')
-rw-r--r--nomsu_decompiler.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/nomsu_decompiler.lua b/nomsu_decompiler.lua
index 1918ac2..bf04f4a 100644
--- a/nomsu_decompiler.lua
+++ b/nomsu_decompiler.lua
@@ -220,10 +220,10 @@ tree_to_inline_nomsu = function(tree)
return NomsuCode:from(tree.source, s)
elseif "Var" == _exp_0 then
local varname = tree[1]
- if varname == "" or is_identifier(varname) then
+ if type(varname) == "string" then
return NomsuCode:from(tree.source, "$", varname)
else
- return NomsuCode:from(tree.source, "$(", varname, ")")
+ return NomsuCode:from(tree.source, "$(", tree_to_inline_nomsu(varname), ")")
end
elseif "FileChunks" == _exp_0 then
return error("Can't inline a FileChunks")