-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix parsing of code without trailing newlines (#940)
When the input doesn't have a trailing newline, but the last line had exactly the amount of bytes as the current indentation level, the tokenizer didn't emit a fake newline, causing parse errors (the grammar expects newlines to conform with the Python spec). I don't see any reason for fake newlines to be omitted in these cases, so this PR removes that condition from the tokenizer. Reported in #930.
- Loading branch information
Showing
3 changed files
with
30 additions
and
4 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
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