Lexer tokens are now created by the lexer
This is so positional information can be accurately embedded into them.
This commit is contained in:
@@ -103,11 +103,11 @@ func (file *File) Close () {
|
||||
|
||||
// Location returns a location struct describing the current position inside of
|
||||
// the file. This can be stored and used to print errors.
|
||||
func (file *File) Location () (location Location) {
|
||||
func (file *File) Location (width int) (location Location) {
|
||||
return Location {
|
||||
file: file,
|
||||
row: file.currentLine,
|
||||
column: file.currentColumn,
|
||||
width: 1,
|
||||
width: width,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user