Browse Source

lexer: fix ReadRune() to actually move the cursor

Signed-off-by: Alejandro Mery <amery@jpi.io>
pull/4/head
Alejandro Mery 1 year ago
parent
commit
edcba80baa
  1. 3
      lexer/reader.go

3
lexer/reader.go

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

Loading…
Cancel
Save