aboutsummaryrefslogtreecommitdiff
path: root/syntax_tree.moon
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-03-14 17:57:55 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-03-14 17:58:22 -0700
commita09b66d72509111e57fb19368d2188a8b71d678e (patch)
tree54aff9f560f54f96f76bdd00e472a2c09919e1de /syntax_tree.moon
parentc2397620a92c0d73cdedeff1912cbd9f13ff090a (diff)
No longer using stubs for non-actions.
Diffstat (limited to 'syntax_tree.moon')
-rw-r--r--syntax_tree.moon3
1 files changed, 2 insertions, 1 deletions
diff --git a/syntax_tree.moon b/syntax_tree.moon
index 31d6924..faf9159 100644
--- a/syntax_tree.moon
+++ b/syntax_tree.moon
@@ -134,7 +134,8 @@ class SyntaxTree
matching: (patt)=>
if patt.type == "Var"
return {[patt\as_var!]:@}
- return nil if patt\get_stub! != @get_stub!
+ return nil if patt.type != @type
+ return nil if patt.type == "Action" and patt\get_stub! != @get_stub!
-- TODO: support vararg matches like (\(say 1 2 3), matching \(say *$values))
return nil if #@ != #patt
match = {}