Lines Matching defs:File
96 type File struct { struct
97 set *FileSet
98 name string // file name as provided to AddFile
99 base int // Pos value range for this file is [base...base+size]
100 size int // file size as provided to AddFile
103 mutex sync.Mutex
104 …int // lines contains the offset of the first character for each line (the first entry is always 0)
105 infos []lineInfo
109 func (f *File) Name() string {
114 func (f *File) Base() int {
119 func (f *File) Size() int {
124 func (f *File) LineCount() int {
135 func (f *File) AddLine(offset int) {
148 func (f *File) MergeLine(line int) {
175 func (f *File) SetLines(lines []int) bool {
193 func (f *File) SetLinesForContent(content []byte) {
215 func (f *File) LineStart(line int) Pos {
240 func (f *File) AddLineInfo(offset int, filename string, line int) {
253 func (f *File) AddLineColumnInfo(offset int, filename string, line, column int) {
265 func (f *File) Pos(offset int) Pos {
276 func (f *File) Offset(p Pos) int {
286 func (f *File) Line(p Pos) int {
298 func (f *File) unpack(offset int, adjusted bool) (filename string, line, column int) {
331 func (f *File) position(p Pos, adjusted bool) (pos Position) {
343 func (f *File) PositionFor(p Pos, adjusted bool) (pos Position) {
356 func (f *File) Position(p Pos) (pos Position) {
447 func searchFiles(a []*File, x int) int {
478 func (s *FileSet) File(p Pos) (f *File) { func