I have an expression macro that collects some data and save them in a global variable. When the compilation is done, I want to write the variable’s contents to a file.
Is there something like an “onCompilationDone” hook where I can register?
I have an expression macro that collects some data and save them in a global variable. When the compilation is done, I want to write the variable’s contents to a file.
Is there something like an “onCompilationDone” hook where I can register?
Yes, check for Context.onAfterTyping haxe.macro.Context - Haxe 4.2.5 API
Thanks a lot Aleksandar.
It’s way better than saving the file every time the macro is invoked.
© 2018-2020 Haxe Foundation - Powered by Discourse