]> Cypherpunks repositories - gostls13.git/commit
go/parser: resolve identifiers properly
authorRobert Griesemer <gri@golang.org>
Thu, 24 Mar 2011 18:45:52 +0000 (11:45 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 24 Mar 2011 18:45:52 +0000 (11:45 -0700)
commit1b2c3e664b08691df57d5999a3b478873dfb06a8
tree2baeb67f2d7cd6154e7858e96e622be335da577f
parent0ac151fd5cb9f6a39927f12016fbe9275229524b
go/parser: resolve identifiers properly

Correctly distinguish between lhs and rhs identifiers
and resolve/declare them accordingly.

Collect field and method names in respective scopes
(will be available after some minor AST API changes).

Also collect imports since it's useful to have that
list directly w/o having to re-traverse the AST
(will also be available after some minor AST API changes).

No external API changes in this CL.

R=rsc, rog
CC=golang-dev
https://golang.org/cl/4271061
src/pkg/go/parser/interface.go
src/pkg/go/parser/parser.go