alias syntax

Ellery Newcomer ellery-newcomer at utulsa.edu
Sat Aug 1 20:13:15 PDT 2009


Jarrett Billingsley wrote:
> On Sat, Aug 1, 2009 at 8:31 PM, Ellery
> Newcomer<ellery-newcomer at utulsa.edu> wrote:
>> what is the purpose of the syntax
>>
>> alias StorageClasses Declarator
>>
>> ?
> 
> I don't know where you're getting that grammar.  Is that from the D spec?

um, yeah.

Declaration:
        typedef Decl
        alias Decl
        Decl

Decl:
        StorageClasses Decl
        BasicType Declarators ;
        BasicType Declarator FunctionBody
	AutoDeclaration


Never mind that's wrong.

but it looks like it should be

alias StorageClasses BasicType Declarator

plus some change. my mistake. emphasis on StorageClasses, not what comes
after it.

Looking through declaration.c, I noticed that semantic disallows
specifically

alias const {blah blah blah}

but not the others.

???!!!!!


More information about the Digitalmars-d-learn mailing list