tools/go
Robert Griesemer 665374f1c8 go/types: add pos parameter to Eval; remove New, EvalNode
Scopes now have "extent" information; that is they provide a
range [scope.Pos(), scope.End()) which describes the source
text range covered by the scope. It requires that the incoming
AST has correct position information; also the extent for the
Universe and for package scopes is not set (positions are invalid).

Objects have a new (currently unexported) scopePos position,
which is the position at which the object becomes visible inside
its *Scope.

Scope.LookupParent takes an addition parameter pos. If valid, an
identifier is looked up as if found at position pos. This can be
used to find the object corresponding to an identifier at position
pos after scopes have been completely populated (and thus may
contain the same identifier which may be defined only later in the
source text).

Fixes #9980.

Change-Id: Icb49c44c5c3d4b93c0718ce2a769ec468877709d
Reviewed-on: https://go-review.googlesource.com/10800
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-06-12 23:04:54 +00:00
..
ast/astutil go/ast/astutil: set Pos for import name 2015-05-19 23:10:16 +00:00
buildutil go/buildutil: fix usage message for -tags flag 2015-05-08 14:48:23 +00:00
callgraph cmd/callgraph: update flag docstring 2015-05-29 17:21:31 +00:00
exact tools: add import comments. 2014-12-09 22:42:16 +00:00
gccgoimporter go/gccgoimporter: disable test case (fix build, at least partially) 2015-02-12 21:45:02 +00:00
gcimporter go/gcimporter: populate (*types.Package).Imports 2015-04-15 18:12:10 +00:00
importer tools: add import comments. 2014-12-09 22:42:16 +00:00
loader oracle: disable parser bailout 2015-05-20 20:27:48 +00:00
pointer go/pointer: Remove a mention of the deleted ImportFromBinary option. 2015-04-29 01:29:12 +00:00
ssa go/ssa/interp: don't run encoding/pem tests in interpreter 2015-06-06 15:50:50 +00:00
types go/types: add pos parameter to Eval; remove New, EvalNode 2015-06-12 23:04:54 +00:00
vcs go/vcs: fix bug in remote package discovery 2015-01-10 08:10:09 +00:00