lexer: fix ReadRune() to actually move the cursor
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -153,6 +153,9 @@ func (b *Reader) ReadRune() (rune, int, error) {
|
||||
|
||||
// decode rune
|
||||
r, l := utf8.DecodeRune(b.buf[b.cursor:])
|
||||
// step over
|
||||
b.cursor += l
|
||||
|
||||
return r, l, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user