mirror of https://github.com/golang/go.git
The only real implementation of position conversion was via a *token.File, so refactor the converter logic to eliminate the Converter interface, and just use a single converter implementation that uses a *token.File to convert between offsets and positions. This change is meant to be a zero-impact refactoring for non-test code. As such, I abstained from panicking in several places where it would make sense. In later CLs, once the bug reporting API lands, we can insert bug reports in these places. Change-Id: Id2e503acd80d089bc5d73e983215784015471f04 Reviewed-on: https://go-review.googlesource.com/c/tools/+/405546 gopls-CI: kokoro <noreply+kokoro@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> |
||
|---|---|---|
| .. | ||
| analysis.go | ||
| cache.go | ||
| check.go | ||
| error_test.go | ||
| errors.go | ||
| imports.go | ||
| keys.go | ||
| load.go | ||
| metadata.go | ||
| mod.go | ||
| mod_tidy.go | ||
| os_darwin.go | ||
| os_windows.go | ||
| parse.go | ||
| parse_test.go | ||
| parsemode_go116.go | ||
| parsemode_go117.go | ||
| pkg.go | ||
| session.go | ||
| snapshot.go | ||
| symbols.go | ||
| view.go | ||
| view_test.go | ||
| workspace.go | ||
| workspace_test.go | ||