tools/refactor/rename
Alan Donovan 03e05ec5a5 refactor/rename: eliminate dependency on refactor/lexical package
so that we can delete that package.

lexicalLookup reconstructs the lexical scope from the existing tree of
types.Scope blocks, using source position information to determine
which prefix of declarations are visible.  (Inspired by Russ's
lookupAtPos in github.com/rsc/grind/grinder.)

forEachLexicalRef implements the part of the recursion from
refactor/lexical that enumerates the ast.Idents that use lexical
lookup.  (I would still like to eliminate this redundant logic by
having go/types record environments, as in CL 9493.)

Change-Id: I040ab33b508aad2dc68fd48850fe92ec072045d1
Reviewed-on: https://go-review.googlesource.com/9544
Reviewed-by: Sameer Ajmani <sameer@golang.org>
2015-08-31 20:58:11 +00:00
..
check.go refactor/rename: eliminate dependency on refactor/lexical package 2015-08-31 20:58:11 +00:00
mvpkg.go refactor/mvpkg: rewrite external test packages. 2015-07-30 21:17:38 +00:00
mvpkg_test.go refactor/mvpkg: rewrite external test packages. 2015-07-30 21:17:38 +00:00
rename.el tools/refactor/rename: add provide to rename.el 2015-07-13 22:45:56 +00:00
rename.go refactor/importgraph: don't ignore imports in packages with errors. 2015-06-26 20:29:59 +00:00
rename_test.go go/buildutil: FakeContext: create build.Context of fake file tree, for testing 2015-01-15 22:46:57 +00:00
spec.go cmd/gorename: make Usage documentation sensible in godoc 2014-12-30 16:36:43 +00:00
util.go astutil: move to go/ast/astutil 2015-01-13 15:47:47 +00:00