diff --git a/position.go b/position.go index 44d38ad..7e24023 100644 --- a/position.go +++ b/position.go @@ -10,7 +10,7 @@ func (p *Position) Advance(rn rune) { p.Index++ if rn == '\n' { p.Line++ - p.Column = 0 + p.Column = 1 } else { p.Column++ } diff --git a/reader.go b/reader.go index a973f5b..1797096 100644 --- a/reader.go +++ b/reader.go @@ -18,7 +18,7 @@ func New(r io.Reader) *Reader { return &Reader{ buf: ds.NewArrayStack[posRune](), src: bufio.NewReader(r), - pos: &Position{Index: 0, Line: 1, Column: 0}, + pos: &Position{Index: 0, Line: 1, Column: 1}, } }