From a5bbce315dd9e6861d426bb16a3d792e2a3c0dfc Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 3 May 2018 22:33:44 -0700 Subject: Minor tweaks/cleanups. --- nomsu_tree.moon | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nomsu_tree.moon') 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) -- cgit v1.2.3