type go/token.File
53 uses
go/token (current package)
position.go#L104: type File struct {
position.go#L116: func (f *File) Name() string {
position.go#L121: func (f *File) Base() int {
position.go#L126: func (f *File) Size() int {
position.go#L131: func (f *File) LineCount() int {
position.go#L141: func (f *File) AddLine(offset int) {
position.go#L153: func (f *File) MergeLine(line int) {
position.go#L173: func (f *File) Lines() []int {
position.go#L188: func (f *File) SetLines(lines []int) bool {
position.go#L206: func (f *File) SetLinesForContent(content []byte) {
position.go#L228: func (f *File) LineStart(line int) Pos {
position.go#L252: func (f *File) AddLineInfo(offset int, filename string, line int) {
position.go#L264: func (f *File) AddLineColumnInfo(offset int, filename string, line, column int) {
position.go#L273: func (f *File) fixOffset(offset int) int {
position.go#L305: func (f *File) Pos(offset int) Pos {
position.go#L318: func (f *File) Offset(p Pos) int {
position.go#L324: func (f *File) Line(p Pos) int {
position.go#L343: func (f *File) unpack(offset int, adjusted bool) (filename string, line, column int) {
position.go#L378: func (f *File) position(p Pos, adjusted bool) (pos Position) {
position.go#L390: func (f *File) PositionFor(p Pos, adjusted bool) (pos Position) {
position.go#L400: func (f *File) Position(p Pos) (pos Position) {
position.go#L433: last atomic.Pointer[File] // cache of last file looked up
position.go#L467: func (s *FileSet) AddFile(filename string, base, size int) *File {
position.go#L469: f := &File{name: filename, size: size, lines: []int{0}}
position.go#L499: func (s *FileSet) AddExistingFiles(files ...*File) {
position.go#L533: func (s *FileSet) RemoveFile(file *File) {
position.go#L547: func (s *FileSet) Iterate(yield func(*File) bool) {
position.go#L554: s.tree.all()(func(f *File) bool {
position.go#L561: func (s *FileSet) file(p Pos) *File {
position.go#L583: func (s *FileSet) File(p Pos) (f *File) {
serialize.go#L33: s.tree.add(&File{
tree.go#L44: file *File
tree.go#L53: func (f *File) key() key {
tree.go#L131: func (t *tree) all() iter.Seq[*File] {
tree.go#L132: return func(yield func(*File) bool) {
tree.go#L308: func (t *tree) add(file *File) {
tree.go#L323: func (t *tree) set(file *File, pos **node, parent *node) {
go/parser
parser.go#L38: file *token.File
parser.go#L77: func (p *parser) init(file *token.File, src []byte, mode Mode) {
resolver.go#L21: func resolveFile(file *ast.File, handle *token.File, declErr func(token.Pos, string)) {
resolver.go#L60: handle *token.File
go/scanner
scanner.go#L31: file *token.File // source file handle
scanner.go#L133: func (s *Scanner) Init(file *token.File, src []byte, err ErrorHandler, mode Mode) {
golang.org/x/tools/internal/gcimporter
bimport.go#L30: file *token.File
iexport.go#L460: func (p *iexporter) encodeFile(w *intWriter, file *token.File, needed []uint64) {
iexport.go#L592: fileInfo map[*token.File]uint64 // value is index in fileInfos
iexport.go#L604: file *token.File
iexport.go#L643: func (p *iexporter) fileIndexAndOffset(file *token.File, pos token.Pos) (uint64, uint64) {
iexport.go#L649: p.fileInfo = make(map[*token.File]uint64)
iimport.go#L221: fileCache: make([]*token.File, len(fileOffset)),
iimport.go#L381: fileCache []*token.File // memoized decoding of file encoded as i
iimport.go#L456: func (p *iimporter) fileAt(index uint64) *token.File {
iimport.go#L466: func (p *iimporter) decodeFile(rd intReader) *token.File {