Compare commits

..

No commits in common. "abc6e44fb223241e23e321e54534dd98c8f74bfd" and "568134a7e9c53f7fd6c284a6180aa4e28df65d04" have entirely different histories.

2 changed files with 5 additions and 10 deletions

View File

@ -111,13 +111,3 @@ func (file *File) Location (width int) (location Location) {
width: width, width: width,
} }
} }
// Path returns the path that teh file is located at.
func (file *File) Path () (path string) {
return file.path
}
// GetLine returns the line at the specified index.
func (file *File) GetLine (index int) (line string) {
return file.lines[index]
}

View File

@ -9,6 +9,11 @@ type Location struct {
width int width int
} }
// NewError creates a new error at this location.
func (location Location) NewError (message string, kind ErrorKind) (err Error) {
return NewError(location, message, kind)
}
// File returns the file the location is in // File returns the file the location is in
func (location Location) File () (file *File) { func (location Location) File () (file *File) {
return location.file return location.file