diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-05-03 22:33:44 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-05-03 22:34:00 -0700 |
| commit | a5bbce315dd9e6861d426bb16a3d792e2a3c0dfc (patch) | |
| tree | f52d66e366bcc9c2aee002a27e69febc6cadef9b /nomsu_tree.moon | |
| parent | bf60ac28c5ab128a15d1b0a2d5f1021dbe7081fd (diff) | |
Minor tweaks/cleanups.
Diffstat (limited to 'nomsu_tree.moon')
| -rw-r--r-- | nomsu_tree.moon | 8 |
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) |
