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 compilation when errors are in embedded DSL
Dmitri Makarov via Digitalmars-d-learn Wed, 18 Feb 2015 09:48:07 -0800
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).
- deliberately failing compilat... Dmitri Makarov via Digitalmars-d-learn
- Re: deliberately failing... Steven Schveighoffer via Digitalmars-d-learn