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 ")" .
ElementList = Element { "," Element } [ "," ] .
Element = [ Key ":" ] Value .
Key = FieldName | Index .
Key = FieldName | ElementIndex .
FieldName = identifier .
ElementIndex = Expression .
Value = Expression .
</pre>