For example, I have a procedure macro attribute on a impl block like this, normally it handles methods:
#[my_proc_macro]
impl Foo {
pub fn bar1() {}
pub fn bar2() {}
}
Now the macro user may not want to write these methods, instead, he wants to invoke a macro to produce these methods, like:
#[my_proc_macro]
impl Foo {
generate_methods!();
}
Now my_proc_macro will be fed with the tokens of macro invocation, instead the tokens of macro invocation result.
My question is: is it possible to expand generate_methods!() inside my_proc_macro, and work with the produced methods?