aboutsummaryrefslogtreecommitdiff
path: root/nomsu_compiler.moon
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-01-18 14:22:17 -0800
committerBruce Hill <bruce@bruce-hill.com>2019-01-18 14:22:48 -0800
commit10bd72e858a8ffaacafa296dbbc429dc73b0111c (patch)
tree3dec18257ac6d1affe78aa33a9b389a25eda1256 /nomsu_compiler.moon
parent520acd39795766354fc44c6e15f5f33f255ca33a (diff)
Added `tree` back as a parameter to compile actions, which helps with
better error reporting, e.g. for (fail) (no arguments). Overall better error reporting now. Also added shorthand ("Action" tree with ...) for (SyntaxTree {.type = "Action", .1 = ...}).
Diffstat (limited to 'nomsu_compiler.moon')
-rw-r--r--nomsu_compiler.moon2
1 files changed, 1 insertions, 1 deletions
diff --git a/nomsu_compiler.moon b/nomsu_compiler.moon
index 0bb020c..e17d5e2 100644
--- a/nomsu_compiler.moon
+++ b/nomsu_compiler.moon
@@ -65,7 +65,7 @@ compile = (tree)=>
args = [arg for arg in *tree when type(arg) != "string"]
-- Force Lua to avoid tail call optimization for debugging purposes
-- TODO: use tail call?
- ret = compile_action(@, unpack(args))
+ ret = compile_action(@, tree, unpack(args))
if ret == nil
info = debug.getinfo(compile_action, "S")
filename = Source\from_string(info.source).filename