@@ -136,6 +136,14 @@ function term_matcher_constructor(term, acSets)
136
136
result = loop (data, bindings, matchers)
137
137
result != = nothing && return success (result, 1 )
138
138
139
+ # if data is of the alternative form (1/...)^(...), it might match with negative exponent
140
+ if (operation (data) === ^ ) && iscall (arguments (data)[1 ]) && (operation (arguments (data)[1 ]) === / ) && isequal (arguments (arguments (data)[1 ])[1 ], 1 )
141
+ one_over_smth = arguments (data)[1 ]
142
+ T = symtype (one_over_smth)
143
+ frankestein = Term {T} (^ , [arguments (one_over_smth)[2 ], - arguments (data)[2 ]])
144
+ result = loop (frankestein, bindings, matchers)
145
+ result != = nothing && return success (result, 1 )
146
+ end
139
147
# if data is of the alternative form 1/(...)^(...), it might match with negative exponent
140
148
if (operation (data) === / ) && isequal (arguments (data)[1 ], 1 ) && iscall (arguments (data)[2 ]) && (operation (arguments (data)[2 ]) === ^ )
141
149
denominator = arguments (data)[2 ]
@@ -200,7 +208,7 @@ function defslot_term_matcher_constructor(term, acSets)
200
208
201
209
function defslot_term_matcher (success, data, bindings)
202
210
! islist (data) && return nothing # if data is not a list, return nothing
203
- # call the normal mathcer , with succes function foo1 that simply returns the bindings
211
+ # call the normal matcher , with success function foo1 that simply returns the bindings
204
212
# <--foo1-->
205
213
result = normal_matcher ((b,n) -> b, data, bindings)
206
214
result != = nothing && return success (result, 1 )
0 commit comments