Commit fb5fce55 authored by Robert Griesemer's avatar Robert Griesemer

fix for incorrect composite literal grammar

(issue found by ken)

R=go-dev, rsc
http://go/go-review/1025030
parent 40621d5c
...@@ -1890,8 +1890,9 @@ LiteralType = StructType | ArrayType | "[" "..." "]" ElementType | ...@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment