Context aware expression compilation.
Hi
In reflaxe_go I am having situations were I need to handle the same expression diffrently based on their context, for example: I use the return statement from a, panic recovery (anologous in haxe to a catch block to trap exceptions). Similer isue is when I want to generate diffrent block level code based on its contents.
My closes Idea is to add a param to the compileExpression of type flag tracker, flag tracker will contain two stacks of flag frames, stack #1 where the calle will push a frame and add all flags, and pass it to all recursive calls, once the function is done it will pop the frame., any call can search for flags in the whole stack stack #2 must be kind of linked list or tree, every call will recive add a node and put flags on that node, and every parent can csearch for flags in all its children frames.
Since that would be quite time consuming to implement I wonder whether there is a better or paved way of doing it.