1 Commits

Author SHA1 Message Date
amery ba212e15e3 Merge branch 'pr-amery-position-add' into next-amery 2023-09-03 16:38:01 +00:00
-26
View File
@@ -84,29 +84,3 @@ func (p *Position) Add(rel Position) {
p.Column += rel.Column - 1
}
}
// Next returns a new Position one rune forward
// on the line
func (p Position) Next() Position {
if p.Line == 0 {
p.Reset()
}
return Position{
Line: p.Line,
Column: p.Column + 1,
}
}
// NextLine returns a new Position at the beginning of the next
// line.
func (p Position) NextLine() Position {
if p.Line == 0 {
p.Reset()
}
return Position{
Line: p.Line + 1,
Column: 1,
}
}