Lexer now records the width of tokens

This commit is contained in:
Sasha Koshka 2024-02-06 23:08:25 -05:00
parent 0133e87831
commit 28fa7321df

View File

@ -181,6 +181,12 @@ func (this *fsplLexer) nextInternal () (token Token, err error) {
}
}
defer func () {
newPos := this.pos()
newPos.End -- // TODO figure out why tf we have to do this
token.Position = token.Position.Union(newPos)
} ()
switch {
// Ident
case unicode.IsLower(this.rune):