-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP Fix inconsistent diagnostics (needs tests) Diagnostic positions were reported inconsistently based on newlines after the error line. This was caused by updating the parser's previous character every time the parser moved to a new line, rather than leaving the previous character on the last parsed token. Because asfv1 doesn't raise errors until it hits a non-whitespace token, this meant that the previous character would be moved from the token that caused the error to the whitespace that followed it. Now, the previous character is only updated once at the beginning of __next__, meaning that it stays on the last successfully parsed token. * Add diagnostic test for error w/ and w/o newline
- Loading branch information
Showing
2 changed files
with
27 additions
and
6 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
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