This repository has been archived on 2022-08-30. You can view files and clone it, but cannot push or open issues or pull requests.
arf/file/location.go

20 lines
511 B
Go

package file
// Location represents a specific point in a file. It is used for error
// reporting.
type Location struct {
file *File
row int
column int
}
// Error prints an error at this location.
func (location Location) Error (width int, message string) {
location.file.Error(location.column, location.row, width, message)
}
// Warn prints a warning at this location.
func (location Location) Warn (width int, message string) {
location.file.Warn(location.column, location.row, width, message)
}