mirror of
https://github.com/Z3Prover/z3
synced 2025-04-07 18:05:21 +00:00
add match for foldli
This commit is contained in:
parent
660bdc33e3
commit
0629353fdc
|
@ -531,6 +531,13 @@ public:
|
|||
#endif
|
||||
};
|
||||
|
||||
#define MATCH_QUATARY(_MATCHER_) \
|
||||
bool _MATCHER_(expr const* n, expr*& a1, expr*& a2, expr *& a3, expr *& a4) const { \
|
||||
if (_MATCHER_(n) && to_app(n)->get_num_args() == 4) { \
|
||||
a1 = to_app(n)->get_arg(0); a2 = to_app(n)->get_arg(1); a3 = to_app(n)->get_arg(2); a4 = to_app(n)->get_arg(3); return true; } \
|
||||
return false; \
|
||||
}
|
||||
|
||||
#define MATCH_TERNARY(_MATCHER_) \
|
||||
bool _MATCHER_(expr const* n, expr*& a1, expr*& a2, expr *& a3) const { \
|
||||
if (_MATCHER_(n) && to_app(n)->get_num_args() == 3) { \
|
||||
|
|
|
@ -403,6 +403,7 @@ public:
|
|||
MATCH_BINARY(is_map);
|
||||
MATCH_TERNARY(is_mapi);
|
||||
MATCH_TERNARY(is_foldl);
|
||||
MATCH_QUATARY(is_foldli);
|
||||
MATCH_BINARY(is_last_index);
|
||||
MATCH_TERNARY(is_replace);
|
||||
MATCH_TERNARY(is_replace_re);
|
||||
|
|
Loading…
Reference in a new issue