Lines Matching defs:File
101 type File struct { struct
102 name string // file name as provided to AddFile
103 base int // Pos value range for this file is [base...base+size]
104 size int // file size as provided to AddFile
107 mutex sync.Mutex
108 …int // lines contains the offset of the first character for each line (the first entry is always 0)
109 infos []lineInfo
113 func (f *File) Name() string {
118 func (f *File) Base() int {
123 func (f *File) Size() int {
128 func (f *File) LineCount() int {
138 func (f *File) AddLine(offset int) {
150 func (f *File) MergeLine(line int) {
170 func (f *File) Lines() []int {
185 func (f *File) SetLines(lines []int) bool {
203 func (f *File) SetLinesForContent(content []byte) {
225 func (f *File) LineStart(line int) Pos {
249 func (f *File) AddLineInfo(offset int, filename string, line int) {
261 func (f *File) AddLineColumnInfo(offset int, filename string, line, column int) {
270 func (f *File) fixOffset(offset int) int {
302 func (f *File) Pos(offset int) Pos {
315 func (f *File) Offset(p Pos) int {
321 func (f *File) Line(p Pos) int {
340 func (f *File) unpack(offset int, adjusted bool) (filename string, line, column int) {
375 func (f *File) position(p Pos, adjusted bool) (pos Position) {
387 func (f *File) PositionFor(p Pos, adjusted bool) (pos Position) {
397 func (f *File) Position(p Pos) (pos Position) {
527 func searchFiles(a []*File, x int) int {
565 func (s *FileSet) File(p Pos) (f *File) { func