www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22564] New: AttributeSpecifier (grammar) definition is wrong

https://issues.dlang.org/show_bug.cgi?id=22564

          Issue ID: 22564
           Summary: AttributeSpecifier (grammar) definition is wrong
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dlang.org
          Assignee: nobody puremagic.com
          Reporter: rumbu rumbu.ro

According to the official grammar this is the definition for an attribute
specifier:

AttributeSpecifier
    Attribute :
    Attribute DeclarationBlock

In fact, when you write

pure  safe nothrow  nogc:

or 

pure  safe nothrow  nogc { }


there are multiple attributes that will be applied to the subsequent
declarations.

Consequentely, in my opinion, the grammar is wrong and should be:

AttributeSpecifier
    Attributes :
    Attributes DeclarationBlock

Attributes
    Attribute
    Attribute Attributes

--
Dec 03 2021