macro_state
macro_state copied to clipboard
Order of execution - building a dependency tree of macros
Hi,
thanks for this crate, it really helps optimizing macro performance and even allows for things which were not possible without shared state between macro calls!
While building my macros a question occurred: Is there a way to build some form of macro dependency order? E.g. I have a proc derive macro that reads and saves the field names of a struct into my state. Later I want to use a macro to build a query fot a database call and I need to know the field names. The second macro depends on the first one. Is there some way to make the compiler wait for the data to be available? E.g. by some polling mechanism? Do you happen to know if the compiler is running in parallel so I can block the execution of one macro to wait for the other to finish? Thanks!