1
0
mirror of https://github.com/golang/go synced 2024-11-18 21:54:49 -07:00
The Go programming language
Go to file
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
benchmark/parse benchmark/parse: fix cosmetic defect in error str. 2015-02-02 17:07:43 +00:00
blog
cmd cmd/vet: backport of https://go-review.googlesource.com/#/c/10777/3 2015-06-09 16:33:12 +00:00
container/intsets container/intsets: Intersects, SubsetOf, SymmetricDifference(With) 2015-01-14 20:51:28 +00:00
cover cover: accept inaccurate block endings 2015-01-07 02:00:16 +00:00
go go/types: add pos parameter to Eval; remove New, EvalNode 2015-06-12 23:04:54 +00:00
godoc go/types: move MethodSetCache into package go/types/typeutil 2015-06-05 17:34:01 +00:00
imports go/ast/astutil: match prefix segments when adding imports 2015-03-30 17:57:25 +00:00
oracle go/types: move MethodSetCache into package go/types/typeutil 2015-06-05 17:34:01 +00:00
playground
present
refactor go/types: move MethodSetCache into package go/types/typeutil 2015-06-05 17:34:01 +00:00
.gitattributes tools: copying .gitattributes to all subrepositories (fixes windows build) 2014-12-23 06:32:51 +00:00
.gitignore dashboard: rearrange tree, in prep for packagification 2015-01-15 02:58:11 +00:00
AUTHORS
codereview.cfg tools: add codereview.cfg 2015-03-18 17:04:00 +00:00
CONTRIBUTING.md doc: add CONTRIBUTING.md 2015-02-18 23:43:38 +00:00
CONTRIBUTORS
LICENSE
PATENTS
README

This subrepository holds the source for various packages and tools that support
the Go programming language.

Some of the tools, godoc and vet for example, are included in binary Go distributions.
Others, including the Go oracle and the test coverage tool, can be fetched with "go get".

Packages include a type-checker for Go and an implementation of the
Static Single Assignment form (SSA) representation for Go programs.

To submit changes to this repository, see http://golang.org/doc/contribute.html.