1
0
mirror of https://github.com/golang/go synced 2024-11-22 00:34:40 -07:00

fix for incorrect composite literal grammar

(issue found by ken)

R=go-dev, rsc
http://go/go-review/1025030
This commit is contained in:
Robert Griesemer 2009-11-09 12:35:56 -08:00
parent 40621d5c0d
commit fb5fce5532

View File

@ -1890,8 +1890,9 @@ LiteralType = StructType | ArrayType | "[" "..." "]" ElementType |
SliceType | MapType | TypeName | "(" LiteralType ")" . SliceType | MapType | TypeName | "(" LiteralType ")" .
ElementList = Element { "," Element } [ "," ] . ElementList = Element { "," Element } [ "," ] .
Element = [ Key ":" ] Value . Element = [ Key ":" ] Value .
Key = FieldName | Index . Key = FieldName | ElementIndex .
FieldName = identifier . FieldName = identifier .
ElementIndex = Expression .
Value = Expression . Value = Expression .
</pre> </pre>