summaryrefslogtreecommitdiff
path: root/src/pkg/go/ast
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2014-07-14 16:17:17 -0700
committerRobert Griesemer <gri@golang.org>2014-07-14 16:17:17 -0700
commit97d0820437c00773f24748d8221974add217a848 (patch)
treec11a3f2891d98acdb4e5bbf54c7ac9a647bdff0c /src/pkg/go/ast
parent10069c9f29881402850a9583b2c0552218097396 (diff)
downloadgo-97d0820437c00773f24748d8221974add217a848.tar.gz
go/*: permit "for range x"
LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/112970044
Diffstat (limited to 'src/pkg/go/ast')
-rw-r--r--src/pkg/go/ast/ast.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/go/ast/ast.go b/src/pkg/go/ast/ast.go
index 6e635cd01..312e3d1b9 100644
--- a/src/pkg/go/ast/ast.go
+++ b/src/pkg/go/ast/ast.go
@@ -699,9 +699,9 @@ type (
// A RangeStmt represents a for statement with a range clause.
RangeStmt struct {
For token.Pos // position of "for" keyword
- Key, Value Expr // Value may be nil
- TokPos token.Pos // position of Tok
- Tok token.Token // ASSIGN, DEFINE
+ Key, Value Expr // Key, Value may be nil
+ TokPos token.Pos // position of Tok; invalid if Key == nil
+ Tok token.Token // ILLEGAL if Key == nil, ASSIGN, DEFINE
X Expr // value to range over
Body *BlockStmt
}