Fix column off-by-one error in source tracking

This commit is contained in:
John Lorentzson 2025-07-09 14:37:12 +02:00
parent c3dc447fe4
commit dd3fe5369d

View file

@ -155,7 +155,6 @@ reading immediately. Should be a subset of *SPECIAL-TOKEN-CHARS*.")
token-source (cons source (cons line column)))))
(loop :for char := (read-char stream)
:for next := (peek-char nil stream nil :eof)
:do (incf column)
:do
(cond
;; Break for next token at whitespace
@ -195,6 +194,7 @@ reading immediately. Should be a subset of *SPECIAL-TOKEN-CHARS*.")
(next-token))
((eql :eof next)
(next-token)))))
:do (incf column)
:until (eql :eof next)))
(nreverse tokens)))