Lexer now records the width of tokens
This commit is contained in:
parent
0133e87831
commit
28fa7321df
@ -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 {
|
switch {
|
||||||
// Ident
|
// Ident
|
||||||
case unicode.IsLower(this.rune):
|
case unicode.IsLower(this.rune):
|
||||||
|
Loading…
Reference in New Issue
Block a user