一个宏修饰的函数调用另一个函数,如何在宏中获取被调用函数的令牌流?
装饰功能:
#[follow]
fn caller(){
return callee();
}
被调用者:
fn callee(){
... // some implementation
}
宏:
#[proc_macro_attribute]
pub fn follow(_metadata: TokenStream, _input: TokenStream) -> TokenStream {
// how to get callee's token stream here?
}