DIP 50 - AST macros

Rikki Cattermole alphaglosined at gmail.com
Mon Nov 11 07:24:00 PST 2013


On Monday, 11 November 2013 at 14:13:31 UTC, Jacob Carlborg wrote:
> On 2013-11-11 14:36, Rikki Cattermole wrote:
>
>> Jacob mentioned originally he wanted to create a compiler 
>> error. Or at
>> least thats is how I took it. Hence pragma(error, "text");
>> We can already message out at both compile and runtime its 
>> simply does
>> the compiler recognise it as an error part.
>
> "error" would be just a single function that is available in 
> the context parameter. There would be many others. From the DIP:
>
> * The arguments used when the compiler was invoked
>
> * Functions for emitting messages of various verbosity level, 
> like error, warning and info
>
> * Functions for querying various types of settings/options, 
> like which versions are defined, is "debug" or "release" 
> defined and so on
>
> * In general providing as much as possible of what the compiler 
> knows about the compile run
>
> * The context should have an associative array with references 
> to all scoped variables at initiation point.

Is there anything specific for info that I should look at? or 
does pragma msg do everything for you?


More information about the Digitalmars-d mailing list