Location now stores width instead of Error

This commit is contained in:
2022-08-12 13:43:09 -05:00
parent 050c956787
commit 7914f0df45
6 changed files with 11 additions and 12 deletions

View File

@@ -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,
}

View File

@@ -108,5 +108,6 @@ func (file *File) Location () (location Location) {
file: file,
row: file.currentLine,
column: file.currentColumn,
width: 1,
}
}

View File

@@ -6,4 +6,5 @@ type Location struct {
file *File
row int
column int
width int
}