mirror of
https://github.com/golang/go
synced 2024-11-18 21:54:49 -07:00
The Go programming language
665374f1c8
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> |
||
---|---|---|
benchmark/parse | ||
blog | ||
cmd | ||
container/intsets | ||
cover | ||
go | ||
godoc | ||
imports | ||
oracle | ||
playground | ||
present | ||
refactor | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
codereview.cfg | ||
CONTRIBUTING.md | ||
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.