Lines Matching defs:token
19 "go/token"
22 // Range represents a source code range in token.Pos form.
26 FileSet *token.FileSet
27 Start token.Pos
28 End token.Pos
31 // TokenConverter is a Converter backed by a token file set and file.
35 fset *token.FileSet
36 file *token.File
41 func NewRange(fset *token.FileSet, start, end token.Pos) Range {
50 // token.File.
51 func NewTokenConverter(fset *token.FileSet, f *token.File) *TokenConverter {
58 fset := token.NewFileSet()
96 // offset is a copy of the Offset function in go/token, but with the adjustment
98 func offset(f *token.File, pos token.Pos) (int, error) {
112 // go/token will panic if the offset is larger than the file's size,
159 pos += token.Pos(col - 1)