DIP 50 - AST macros

Jacob Carlborg doob at me.com
Mon Nov 11 05:16:23 PST 2013


On 2013-11-11 13:36, Rikki Cattermole wrote:

> Yes outside of macros would be useful. For example code like this would
> become redundant:
> pragma(msg, "Support for x is not implemented on platform y");
> static assert(0);
>
> Becoming:
> pragma(error, "Support for x is not implemented on platform y");
>
> Also pragma's core responsibility is to cause the compiler to do
> something. In this case to say we hit an error during compilation please
> tell the user/dev and die.
>
> It is a hook to the compilers workings.
>
> Currently working on getting this implemented. Nearly done with it. Just
> got some extra spaces that shouldn't be in output.

I just don't want to add a bunch of pragmas. I don't know what's the 
best solution.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list