You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here some Context. I need to search an Expression AST for a very specific pattern. Without the ExpRelation::fun_ and ExpLogical::fun_ bindings it worked quite well, but when I first began to experiment with the first code snippet instead of the simpler
Hi Florian,
Yes, all patterns are essentially the same to the library - it doesn't know a particular pattern is a var (variable pattern) or C (constructor pattern). It simply assumes they would model corresponding concept, which they do and forwards the computations accordingly. Can you perhaps extract a small repro of what doesn't work and what you expect it to do?
Is it possible to mix instances of
var
and nested patterns in the binding part of a constructor pattern? For example, is the following code allowed:Case(C<ExpLogical>( C<ExpRelation>( C<ExpCharacter>(charVal), C<ExpName>(name), relOp), C<ExpAttribute>(attrName), logOp)){
where attrName, name, charVal, logOp and relOp are instances of the var template and Exp* have the layout:
Here some Context. I need to search an Expression AST for a very specific pattern. Without the
ExpRelation::fun_
andExpLogical::fun_
bindings it worked quite well, but when I first began to experiment with the first code snippet instead of the simplerCase(C<ExpLogical>( C<ExpRelation>( C<ExpCharacter>(charVal), C<ExpName>(name)), C<ExpAttribute>(attrName))){
no pattern seemed to match anymore.
The text was updated successfully, but these errors were encountered: