Macro hub for metas and @build


I see that I use some “meta searching” on my classes and fields. I mean, I have some class/fields metas that do something different. And let’s say I use it on onAfterTyping. So I added many times Compiler.onAfterTyping but this way I think it executes as many times as I want right ? So it “iterates” several times on the class/fields.
My idea was to have just one onAfterTyping and kind of register functions that will be called with the class/field everytime a meta will be find.
Do you think it will speedup compilation ? Is it a good idea ?

And in the same idea I thought about several @:build on the same type. I will have to iterate several times on Context.getBuildFields(). Do you think it’s a good idea to have just one @:build on a type and register callback functions that will be called with the field as argument ? Or maybe here it’s not a bit speed gain ?

Thanks for your feedbacks :slight_smile:

tink_syntaxhub does exactly that. It is not only about speed gain. But also let you define the order of the build macros otherwise it is unspecified with mulitple @:build meta

Hej Kevin !

Thanks for your reply ! In fact, I was quite sure that you or Juraj will answer that because I know about tink_syntaxhub and I thought it was doing something like that.
Does tnik_synthaxhub do the same with metas ?