]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/syntax: update a couple of comments
authorRobert Griesemer <gri@golang.org>
Tue, 3 Apr 2018 20:59:14 +0000 (13:59 -0700)
committerRobert Griesemer <gri@golang.org>
Tue, 3 Apr 2018 21:57:14 +0000 (21:57 +0000)
Change-Id: Ie84d0e61697922c1e808d815fb7d9aec694ee8e9
Reviewed-on: https://go-review.googlesource.com/104615
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/syntax/nodes.go

index c1da4adf5279600b2e25546ba8c56b9ba71dccbc..6d468ed80ef811bc5b93cce8142deefc6d0f8de1 100644 (file)
@@ -280,8 +280,7 @@ type (
 
        // map[Key]Value
        MapType struct {
-               Key   Expr
-               Value Expr
+               Key, Value Expr
                expr
        }
 
@@ -385,7 +384,7 @@ type (
                Init SimpleStmt
                Cond Expr
                Then *BlockStmt
-               Else Stmt // either *IfStmt or *BlockStmt
+               Else Stmt // either nil, *IfStmt, or *BlockStmt
                stmt
        }
 
@@ -399,7 +398,7 @@ type (
 
        SwitchStmt struct {
                Init   SimpleStmt
-               Tag    Expr
+               Tag    Expr // incl. *TypeSwitchGuard
                Body   []*CaseClause
                Rbrace Pos
                stmt