Thanks for your quick feedback!
So, if I want to intercept some compiler errors (ie: Constructor argument missing, and/or wrong argument type...), it means that I should re-implement compiler's logic on my side before building the expression ?
Quick example. I'm building this little piece of code:
<receiver id="receiver" type="hex.ioc.parser.xml.mock.MockReceiverModule"/>
<proxy id="eventProxy" type="hex.event.EventProxy">
<argument ref="receiver"/>
</proxy>
With:
85 e = macro { new $typePath( $a { constructorVO.constructorArgs } ); };
86 try Context.typeof( e )
87 catch (error:Dynamic) trace(error);
NB: EventProxy signature is new( scope : Dynamic, method : Dynamic )
So I got:
hexIoC/src/hex/compiler/factory/ClassInstanceFactory.hx:85: characters 16-69 : Not enough arguments, expected method:Dynamic
hexIoC/src/hex/compiler/factory/ClassInstanceFactory.hx:87: Unknown identifier : receiver
I'm trying to figure out a nice way to intercept these kind of errors before the compiler to mark/position them inside the DSL file.
Thanks again.