I'm developing an embedded DSL using CTFE. The DSL code is translated into D code and mixin-ed into the D code of user's application. In order to provide meaningful error messages the DSL compiler always intercepts all errors in the DSL code and reports them at compile-time using pragma(msg, ...). The DSL compiler never generates incorrect D code to avoid reporting errors in the generated D code obscurely related to the original DSL code. The problem is that the D compiler always exits as if the compilation was successful (for D compiler it is successful, since the generated D code is correct).

Is there any way to force the D compiler to fail compilation other than generating incorrect D code when translating erroneous DSL code?
  • deliberately failing compilat... Dmitri Makarov via Digitalmars-d-learn

Reply via email to