Hello Community,
I would like to use a macro to rebuild a given function. The parameterTypes, the function body and the returnValueType should be seperated and be handed over to another object.
But instead of analysing the fields of a whole class with @:build I would like to hand over a function to a macro function that returns an object like the following.
macro static function rebuildFunction( func : haxe.Constraints.Function ) : Expr
... which finally supplies the following object on runtime:
{ func : Function, params : Array<T>, returnValue : T }
So how do I convert a haxe.Constraints.Function type to a haxe.macro.Expr.Function type?
Does anybody have an idea?
Kind regards
Michael