aboutsummaryrefslogtreecommitdiff
path: root/syntax_tree.moon
diff options
context:
space:
mode:
Diffstat (limited to 'syntax_tree.moon')
-rw-r--r--syntax_tree.moon4
1 files changed, 3 insertions, 1 deletions
diff --git a/syntax_tree.moon b/syntax_tree.moon
index b59f1ef..6347be8 100644
--- a/syntax_tree.moon
+++ b/syntax_tree.moon
@@ -111,10 +111,12 @@ class SyntaxTree
SyntaxTree.__base.__type = "Syntax Tree"
-getmetatable(SyntaxTree).__call = (t)=>
+getmetatable(SyntaxTree).__call = (t, ...)=>
if type(t.source) == 'string'
t.source = Source\from_string(t.source)
setmetatable(t, @__base)
+ for i=1,select("#", ...)
+ t[i] = select(i, ...)
if t.type == 'Action'
t.stub = t\get_stub!
return t