Closed
Description
Hi,
t appears that the CRLF newline sequence is being double counted when calculating the line number in the metadata.
To reproduce
- Open up the basilisp REPL, evaluate a string that defines a variable after a single CRLF sequence, and then retrieve the metadata.a. The
:line
number in the meta is 3, instead of 2
> basilisp repl
basilisp.user=> (load-string "\r\n(def crlf 123)")
#'basilisp.user/crlf
basilisp.user=> (meta #'crlf)
{:line 3 :col 0 :ns basilisp.user :end-col 14 :end-line 3 :file "<Load Input>" :name crlf}
For comparison, using a single newline character reports the correct line number:
basilisp.user=> (meta #'n)
{:line 2 :col 0 :ns basilisp.user :end-col 11 :end-line 2 :file "<Load Input>" :name n}
PR to follow.
Thanks