]> Cypherpunks repositories - gostls13.git/commitdiff
go/parser: more precise comment
authorRobert Griesemer <gri@golang.org>
Mon, 25 Feb 2013 16:29:46 +0000 (08:29 -0800)
committerRobert Griesemer <gri@golang.org>
Mon, 25 Feb 2013 16:29:46 +0000 (08:29 -0800)
See also CL 7383051 for details.

R=adonovan, bradfitz
CC=golang-dev
https://golang.org/cl/7378063

src/pkg/go/parser/parser.go

index 40fa10d772cba3701ba1da907a55acafff475e6e..a021a5abe5b37fb3a5c1bde118a0e2b704c64509 100644 (file)
@@ -1229,11 +1229,11 @@ func (p *parser) parseElement(keyOk bool) ast.Expr {
        // In the former case we are done, and in the latter case we don't
        // care because the type checker will do a separate field lookup.
        //
-       // If the key does not resolve, it must a) be defined at the top-
-       // level in another file of the same package or be undeclared, or
-       // b) it is a struct field. In the former case, the type checker
-       // can do a top-level lookup, and in the latter case it will do a
-       // separate field lookup.
+       // If the key does not resolve, it a) must be defined at the top
+       // level in another file of the same package, the universe scope, or be
+       // undeclared; or b) it is a struct field. In the former case, the type
+       // checker can do a top-level lookup, and in the latter case it will do
+       // separate field lookup.
        x := p.checkExpr(p.parseExpr(keyOk))
        if keyOk {
                if p.tok == token.COLON {