Documentation ¶
Index ¶
- type File
- func (f *File) AddLine(offset int)
- func (f *File) Base() int
- func (f *File) FileSetPos(offset int) Pos
- func (f *File) LineCount() int
- func (f *File) LineStart(line int) Pos
- func (f *File) Name() string
- func (f *File) Offset(p Pos) int
- func (f *File) Position(p Pos) (pos FilePos)
- func (f *File) Size() int
- type FilePos
- type FileSet
- type Pos
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File represents a source file.
func (*File) FileSetPos ¶
FileSetPos returns the position in the file set.
type FilePos ¶
type FilePos struct { Filename string // filename, if any Offset int // offset, starting at 0 Line int // line number, starting at 1 Column int // column number, starting at 1 (byte count) }
FilePos represents a position information in the file.
func (FilePos) String ¶
String returns a string in one of several forms:
file:line:column valid position with file name file:line valid position with file name but no column (column == 0) line:column valid position without file name line valid position without file name and no column (column == 0) file invalid position with file name - invalid position without file name
type FileSet ¶
type FileSet struct {
// contains filtered or unexported fields
}
FileSet represents a set of source files.
Click to show internal directories.
Click to hide internal directories.