Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// File name as provided to AddFile
Name string
// Pos value range for this file is [base...base+size]
Base int
// File size as provided to AddFile
Size int
// Lines contains the offset of the first character for each line (the first entry is always 0)
Lines []int
// 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 {
Base int // base offset for the next file
Files []*File // list of files in the order added to the set
LastFile *File // cache of last file looked up
}
FileSet represents a set of source files.
Click to show internal directories.
Click to hide internal directories.