File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,9 @@ function matcher(val::Any)
13
13
# just two arguments bc defslot is only supported with operations with two args: *, ^, +
14
14
if length (arguments (val)) == 2 && any (x -> isa (x, DefSlot), arguments (val))
15
15
return defslot_term_matcher_constructor (val)
16
- # else return a normal term matcher
17
- else
18
- return term_matcher_constructor (val)
19
16
end
17
+ # else return a normal term matcher
18
+ return term_matcher_constructor (val)
20
19
end
21
20
22
21
function literal_matcher (next, data, bindings)
@@ -232,6 +231,7 @@ function defslot_term_matcher_constructor(term)
232
231
normal_matcher = term_matcher_constructor (term)
233
232
234
233
function defslot_term_matcher (success, data, bindings)
234
+ ! islist (data) && return nothing # if data is not a list, return nothing
235
235
result = normal_matcher (success, data, bindings)
236
236
result != = nothing && return result
237
237
# if no match, try to match with a defslot
You can’t perform that action at this time.
0 commit comments