aboutsummaryrefslogtreecommitdiff
path: root/nomsu_tree.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-05-03 22:33:44 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-05-03 22:34:00 -0700
commita5bbce315dd9e6861d426bb16a3d792e2a3c0dfc (patch)
treef52d66e366bcc9c2aee002a27e69febc6cadef9b /nomsu_tree.moon
parentbf60ac28c5ab128a15d1b0a2d5f1021dbe7081fd (diff)
Minor tweaks/cleanups.
Diffstat (limited to 'nomsu_tree.moon')
-rw-r--r--nomsu_tree.moon8
1 files changed, 4 insertions, 4 deletions
diff --git a/nomsu_tree.moon b/nomsu_tree.moon
index 69f338f..8fe8283 100644
--- a/nomsu_tree.moon
+++ b/nomsu_tree.moon
@@ -116,13 +116,13 @@ math_expression = re.compile [[ ([+-] " ")* "%" (" " [*/^+-] (" " [+-])* " %")+
Tree "Action",
as_lua: (nomsu)=>
stub = @get_stub!
- macro = nomsu.environment.MACROS[stub]
- if macro
+ compile_action = nomsu.environment.COMPILE_ACTIONS[stub]
+ if compile_action
args = [arg for arg in *@value when arg.type != "Word"]
-- Force all compile-time actions to take a tree location
- args = [args[p-1] for p in *nomsu.environment.ARG_ORDERS[macro][stub]]
+ args = [args[p-1] for p in *nomsu.environment.ARG_ORDERS[compile_action][stub]]
-- Force Lua to avoid tail call optimization for debugging purposes
- ret = macro(self, unpack(args))
+ ret = compile_action(self, unpack(args))
return ret
action = rawget(nomsu.environment.ACTIONS, stub)
lua = Lua.Value(@source)