2024-09-17 10:49:31 -07:00
|
|
|
//@ edition: 2018
|
2024-08-29 18:52:44 +00:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! make_matcher {
|
|
|
|
($name:ident, $fragment_type:ident, $d:tt) => {
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! $name {
|
|
|
|
($d _:$fragment_type) => { true };
|
|
|
|
(const { 0 }) => { false };
|
2024-09-17 10:49:31 -07:00
|
|
|
(A | B) => { false };
|
2024-08-29 18:52:44 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
2024-09-17 10:49:31 -07:00
|
|
|
make_matcher!(is_expr_from_2018, expr, $);
|
|
|
|
make_matcher!(is_pat_from_2018, pat, $);
|