go/internal/span
Robert Findley facb0d30e9 internal/span: eliminate Converter and FileConverter
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>
2022-05-17 16:08:12 +00:00
..
parse.go internal/lsp/cache: parse filenames from go list errors correctly 2021-03-02 01:39:30 +00:00
span.go internal/span: eliminate Converter and FileConverter 2022-05-17 16:08:12 +00:00
span_test.go internal/span: eliminate Converter and FileConverter 2022-05-17 16:08:12 +00:00
token.go internal/span: eliminate Converter and FileConverter 2022-05-17 16:08:12 +00:00
token_test.go internal/span: eliminate Converter and FileConverter 2022-05-17 16:08:12 +00:00
uri.go internal/span: fix a comment about windows drive letters 2021-08-03 19:59:22 +00:00
uri_test.go all: go fmt ./... 2021-02-20 03:28:52 +00:00
uri_windows_test.go all: go fmt ./... 2021-02-20 03:28:52 +00:00
utf16.go internal/span: compute utf16 length directly 2021-05-20 14:08:36 +00:00
utf16_test.go internal/span: remove check for nil content 2020-09-02 00:13:12 +00:00