Pos() returns a Position object

This commit is contained in:
milarin
2023-06-30 18:08:34 +02:00
parent 5897251193
commit 19e0a61345
2 changed files with 4 additions and 4 deletions

View File

@ -33,8 +33,8 @@ func (r *Reader) psrn(rn rune) posRune {
}
}
func (r *Reader) Pos() (index, line, column int) {
return r.pos.Index, r.pos.Line, r.pos.Column
func (r *Reader) Pos() Position {
return *r.pos
}
// Rune returns the next rune in r