Discover Packages
elias.sx/twirp
_tools
src
github.com
golang
protobuf
protoc-gen-go
generator
internal
remap
package
Version:
v5.10.0+incompatible
Opens a new window with list of versions in this module.
Published: Dec 16, 2019
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package remap handles tracking the locations of Go tokens in a source text
across a rewrite by the Go formatter.
type Location struct {
Pos, End int
}
A Location represents a span of byte offsets in the source text.
A Map represents a mapping between token locations in an input source text
and locations in the correspnding output text.
Compute constructs a location mapping from input to output. An error is
reported if any of the tokens of output cannot be mapped.
Find reports whether the specified span is recorded by m, and if so returns
the new location it was mapped to. If the input span was not found, the
returned location is the same as the input.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.