MACRO : How can I influence the compilation order on compile time?

47 views
Skip to first unread message

AlienCoder

unread,
Apr 28, 2017, 11:12:01 AM4/28/17
to Haxe

Hello community,

I have the following problem:

I need to equip a map with package informations. This one is nested, so any package name leads to another map, that represents the next package level (but this information is less important for the problem itself).

Simplified it looks like this:


var packageMap : Map<String,Map>;

So this map is build with a macro. The building process it self is no big matter.

But I need to store this map so it is retrievable on runtime.

I would like to retrieve it in a macro-infused expression at the beginning of the Main.main()

But the main is compiled first, which makes sense from the compiler's point of view.

On the other hand:

How can I influence the code of the Main.main() after the complete structure has passed through the compiler?

The idea is, to show the package structure as html code. So the package structure must be handed over to javaScript after it has been analyzed.

I am thankfull for any suggestion.

Kind regards
Michael
Reply all
Reply to author
Forward
0 new messages