Skip to content

Commit

Permalink
Allow partial type for AA key type
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Jan 29, 2015
1 parent 42b7679 commit dc7f32e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions declaration.dd
Expand Up @@ -133,6 +133,8 @@ $(GNAME BasicType2X):
$(D [) $(VEXPRESSION) $(D ])
$(D [) $(VEXPRESSION) .. $(VEXPRESSION) $(D ])
$(D [) $(GLINK Type) $(D ])
$(D [) $(D auto) $(GLINK BasicType3)$(OPT) $(D ])
$(D [) $(GLINK TypeCtors) $(GLINK BasicType3)$(OPT) $(D ])
$(D delegate) $(GLINK2 function, Parameters) $(GLINK2 function, MemberFunctionAttributes)$(OPT)
$(D function) $(GLINK2 function, Parameters) $(GLINK2 function, FunctionAttributes)$(OPT)

Expand All @@ -144,6 +146,8 @@ $(GNAME BasicType3X):
$(D [ ])
$(D [) $(VEXPRESSION) $(D ])
$(D [) $(GLINK Type) $(D ])
$(D [) $(D auto) $(I BasicType3)$(OPT) $(D ])
$(D [) $(GLINK TypeCtors) $(I BasicType3)$(OPT) $(D ])

$(GNAME IdentifierList):
$(I Identifier)
Expand Down Expand Up @@ -329,6 +333,7 @@ $(GNAME AutoDeclarationX):
auto[$] a = ["hello", "world"]; // type is string[2]
const[] b = [1, 2]; // type is const(int)[]
immutable* c = new int(3); // type is immutable(int)*
auto[$][auto[$]] d = [[1]:[2]]; // type is int[1][int[1]]
---
)

Expand Down
4 changes: 4 additions & 0 deletions grammar.dd
Expand Up @@ -64,6 +64,8 @@ $(GNAME BasicType2X):
$(D [) $(ASSIGNEXPRESSION) $(D ])
$(D [) $(ASSIGNEXPRESSION) .. $(ASSIGNEXPRESSION) $(D ])
$(D [) $(GLINK Type) $(D ])
$(D [) $(D auto) $(GLINK BasicType3)$(OPT) $(D ])
$(D [) $(GLINK TypeCtors) $(GLINK BasicType3)$(OPT) $(D ])
$(D delegate) $(GLINK Parameters) $(GLINK MemberFunctionAttributes)$(OPT)
$(D function) $(GLINK Parameters) $(GLINK FunctionAttributes)$(OPT)

Expand All @@ -75,6 +77,8 @@ $(GNAME BasicType3X):
$(D [ ])
$(D [) $(VEXPRESSION) $(D ])
$(D [) $(GLINK Type) $(D ])
$(D [) $(D auto) $(I BasicType3)$(OPT) $(D ])
$(D [) $(GLINK TypeCtors) $(I BasicType3)$(OPT) $(D ])

$(GNAME IdentifierList):
$(I Identifier)
Expand Down

0 comments on commit dc7f32e

Please sign in to comment.