mirror of
https://github.com/golang/go
synced 2024-11-22 00:14:42 -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:
parent
40621d5c0d
commit
fb5fce5532
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user