]> Cypherpunks repositories - gostls13.git/commitdiff
spec: clarify lhs syntax for range and select
authorRobert Griesemer <gri@golang.org>
Fri, 18 Jan 2013 21:59:25 +0000 (13:59 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 18 Jan 2013 21:59:25 +0000 (13:59 -0800)
Fixes #4653.

R=rsc, r, iant, ken, thakis
CC=golang-dev
https://golang.org/cl/7135058

doc/go_spec.html

index 0309209c2a1b25a3025063bebcf6dba6f6780ea5..239e69c987cd18e45817d387a1bcbc0710c86210 100644 (file)
@@ -1,6 +1,6 @@
 <!--{
        "Title": "The Go Programming Language Specification",
-       "Subtitle": "Version of January 11, 2013",
+       "Subtitle": "Version of January 18, 2013",
        "Path": "/ref/spec"
 }-->
 
@@ -4353,7 +4353,7 @@ to corresponding <i>iteration variables</i> and then executes the block.
 </p>
 
 <pre class="ebnf">
-RangeClause = Expression [ "," Expression ] ( "=" | ":=" ) "range" Expression .
+RangeClause = ( ExpressionList "=" | IdentifierList ":=" ) "range" Expression .
 </pre>
 
 <p>
@@ -4522,7 +4522,7 @@ cases all referring to communication operations.
 SelectStmt = "select" "{" { CommClause } "}" .
 CommClause = CommCase ":" { Statement ";" } .
 CommCase   = "case" ( SendStmt | RecvStmt ) | "default" .
-RecvStmt   = [ Expression [ "," Expression ] ( "=" | ":=" ) ] RecvExpr .
+RecvStmt   = [ ExpressionList "=" | IdentifierList ":=" ] RecvExpr .
 RecvExpr   = Expression .
 </pre>