go/cmd/guru
Alan Donovan fb3df4a89d cmd/guru: definition: try parser-based resolution first
The parser does intra-file resolution.  It's only a best-effort but
it's extremely fast, so we try it first and fall back to the loader-based
implementation if it fails.

Also:
- factor definitionResult so it doesn't depend on either go/types.Object
  or go/ast.Object.
- guessImportPath: make importPath=="" result an error,
  since you can't import the empty string.  Simplify importQueryPackage.
- Make fastQueryPos continue in face of minor parse errors.
- describe: eliminate old TODO; suppress log statement.

Change-Id: I30a32487e9fd9d5308b1580ec12220cad2c16299
Reviewed-on: https://go-review.googlesource.com/19507
Reviewed-by: Daniel Morsing <daniel.morsing@gmail.com>
2016-02-16 00:29:23 +00:00
..
serial cmd/guru: rename oracle to guru, copying it to a single package 2016-02-12 03:38:58 +00:00
testdata/src cmd/guru: describe: show methods and fields of an expression 2016-02-15 03:46:17 +00:00
callees.go cmd/guru: fix bad import, and run gofmt 2016-02-12 03:58:01 +00:00
callers.go cmd/guru: call{ers,stack}: avoid pointer analysis where possible 2016-02-12 23:38:00 +00:00
callstack.go cmd/guru: call{ers,stack}: avoid pointer analysis where possible 2016-02-12 23:38:00 +00:00
definition.go cmd/guru: definition: try parser-based resolution first 2016-02-16 00:29:23 +00:00
describe.go cmd/guru: definition: try parser-based resolution first 2016-02-16 00:29:23 +00:00
emacs-test.bash cmd/guru: in Emacs, change 'definition' to jump directly 2016-02-15 17:57:16 +00:00
freevars.go cmd/guru: freevars: reenable test of labels (and improve output) 2016-02-12 03:59:51 +00:00
guru.el cmd/guru: emacs: report an error when the guru command fails 2016-02-15 21:39:43 +00:00
guru.go cmd/guru: definition: try parser-based resolution first 2016-02-16 00:29:23 +00:00
guru.vim cmd/guru: clean ups to command-line interface 2016-02-12 21:50:49 +00:00
guru_test.go cmd/guru: remove vestiges of -pos flag 2016-02-12 22:00:14 +00:00
implements.go cmd/guru: fix bad import, and run gofmt 2016-02-12 03:58:01 +00:00
main.go cmd/guru: add support for loading modified files 2016-02-15 15:04:13 +00:00
peers.go cmd/guru: fix bad import, and run gofmt 2016-02-12 03:58:01 +00:00
pointsto.go cmd/guru: fix bad import, and run gofmt 2016-02-12 03:58:01 +00:00
pos.go cmd/guru: definition: try parser-based resolution first 2016-02-16 00:29:23 +00:00
referrers.go cmd/guru: add support for loading modified files 2016-02-15 15:04:13 +00:00
what.go cmd/guru: definition: try parser-based resolution first 2016-02-16 00:29:23 +00:00
whicherrs.go cmd/guru: rename oracle to guru, copying it to a single package 2016-02-12 03:38:58 +00:00