Location now stores width instead of Error
This commit is contained in:
@@ -12,7 +12,6 @@ const (
|
||||
|
||||
type Error struct {
|
||||
Location
|
||||
width int
|
||||
message string
|
||||
kind ErrorKind
|
||||
}
|
||||
@@ -20,7 +19,6 @@ type Error struct {
|
||||
// NewError creates a new error at the specified location.
|
||||
func NewError (
|
||||
location Location,
|
||||
width int,
|
||||
message string,
|
||||
kind ErrorKind,
|
||||
) (
|
||||
@@ -28,7 +26,6 @@ func NewError (
|
||||
) {
|
||||
return &Error {
|
||||
Location: location,
|
||||
width: width,
|
||||
message: message,
|
||||
kind: kind,
|
||||
}
|
||||
|
||||
@@ -108,5 +108,6 @@ func (file *File) Location () (location Location) {
|
||||
file: file,
|
||||
row: file.currentLine,
|
||||
column: file.currentColumn,
|
||||
width: 1,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,4 +6,5 @@ type Location struct {
|
||||
file *File
|
||||
row int
|
||||
column int
|
||||
width int
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user