This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 1- macro_rules! outer {
2- ( $( $matcher: tt) * ) => {
1+ macro_rules! make_macro {
2+ ( $macro_name : ident $ ( $matcher: tt) * ) => {
33 #[ macro_export]
4- macro_rules! inner {
4+ macro_rules! $macro_name {
55 ( <= $( $matcher) * =>) => { } ;
66 }
77 }
88}
99
10- // @has macro_generated_macro/macro.inner .html //pre 'macro_rules! inner {'
10+ // @has macro_generated_macro/macro.interpolations .html //pre 'macro_rules! interpolations {'
1111// @has - //pre '(<= type $($i : ident) :: * + $e : expr =>) => { ... };'
12- outer ! ( type $( $i: ident) :: * + $e: expr) ;
12+ make_macro ! ( interpolations type $( $i: ident) :: * + $e: expr) ;
13+ interpolations ! ( <= type foo:: bar + x. sort( ) =>) ;
1314
14- inner ! ( <= type foo:: bar + x. sort( ) =>) ;
15+ // @has macro_generated_macro/macro.attributes.html //pre 'macro_rules! attributes {'
16+ // @has - //pre '(<= #! [no_std] #[inline] =>) => { ... };'
17+ make_macro ! ( attributes #![ no_std] #[ inline] ) ;
18+
19+ // @has macro_generated_macro/macro.groups.html //pre 'macro_rules! groups {'
20+ // @has - //pre '(<= fn {} () { foo [0] } =>) => { ... };'
21+ make_macro ! ( groups fn { } ( ) { foo[ 0 ] } ) ;
You can’t perform that action at this time.
0 commit comments