-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add line number to parsing error
Prior to this commit, [ParsingError] tracked the step of the source instead of the line number. This is not friendly to the user as he won't be able to find the location of the error. A common standard is to display the line number, so the user can easily spot the location of the error. This commit introduces such track. It keeps a 1:1 map on [TokenStream] from the token to the parsed line. As in common text editors, line number starts at `1`. It also removes the `pos` from [Token] as its only purpose was to display the step to the user. The introduction of `line` completely supersedes that. closes #574
- Loading branch information
Showing
5 changed files
with
141 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.