@@ -200,12 +200,14 @@ function defslot_term_matcher_constructor(term, acSets)
200
200
201
201
function defslot_term_matcher (success, data, bindings)
202
202
! islist (data) && return nothing # if data is not a list, return nothing
203
- result = normal_matcher (success, data, bindings)
204
- result != = nothing && return result
203
+ # call the normal mathcer, with succes function foo1 that simply returns the bindings
204
+ # <--foo1-->
205
+ result = normal_matcher ((b,n) -> b, data, bindings)
206
+ result != = nothing && return success (result, 1 )
205
207
# if no match, try to match with a defslot.
206
- # checks whether it matches the normal part if yes executes (foo)
207
- # (foo) : adds the pair (default value name, default value) to the found bindings
208
- # <------------------(foo) ---------------------------->
208
+ # checks whether it matches the normal part if yes executes foo2
209
+ # foo2 : adds the pair (default value name, default value) to the found bindings
210
+ # <-------------------foo2 ---------------------------->
209
211
result = other_part_matcher ((b,n) -> assoc (b, defslot. name, defslot. defaultValue), data, bindings)
210
212
result != = nothing && return success (result, 1 )
211
213
nothing
0 commit comments