since when was this valid syntax?

Timon Gehr timon.gehr at gmx.ch
Sat Sep 8 12:33:39 PDT 2012


On 09/08/2012 09:25 PM, Maxim Fomin wrote:
> On Saturday, 8 September 2012 at 16:00:44 UTC, Timon Gehr wrote:
>> On 09/08/2012 04:11 PM, Ellery Newcomer wrote:
>>> alias enum int e;
>>
>> It is valid according to the grammar and DMD ignores meaningless
>> attributes.
>>
>> scope shared @disable @trusted package final override deprecated
>> extern __gshared synchronized pure nothrow ref static abstract
>> immutable alias auto final override deprecated extern __gshared
>> synchronized enum pure nothrow ref static abstract @safe @disable
>> scope int e;
>
> How dmd's parser is written if it allows such things?

It's the grammar that allows this. Every parser that follows the grammar 
would accept this.


More information about the Digitalmars-d-learn mailing list