Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
Description
The original code counts EOLs only (CR/LF/CRLF), starting from 0.
Thus the line number stays as 0 until the EOL of the first line is seen.
This is confusing: if a parsing error is detected before EOL is reached on the first line it will be reported as line 0, whereas if the error is detected after EOL is detected but before any other characters are read it will be reported as line 1. However as far as the user is concerned in both cases the syntax error is in line 1.
The current line number should start at 0 (when nothing has been processed) and be returned as line 1 from the 1st character read up until the end of the first line.