I have one proc macro
that looks like this:
#[proc_macro_attribute]
pub fn my_macro(_meta: CompilerTokenStream, input: CompilerTokenStream) -> CompilerTokenStream { //* bits of code */ }
Then I have a derive macro
:
#[proc_macro_derive(Operations)]
pub fn operations(input: proc_macro::TokenStream) -> proc_macro::TokenStream { //* bits of code */ }
Is it possible to make the derive macro being expanded after the attribute one?
The reason is that I have a crate with some static variables to track data. And I need to read the data in the derive macro
(the attribute macro
is the writer)