-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(parser): do not panic with unbalanced parenthesis (#483)
A set of unbalanced parenthesis caused the new parser to eventually hit an EOF while it was looking for it. Because it assumed it found the right parenthesis, it advanced the end position beyond the end of the slice and caused a runtime panic. This change does two things: 1. It verifies that the EOF token will have the proper position information. 2. The parser uses the literal length returned by `expect` when finding the end position.
- Loading branch information
1 parent
b8c5a0e
commit 8baaec7
Showing
4 changed files
with
76 additions
and
15 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
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