-
-
Notifications
You must be signed in to change notification settings - Fork 821
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix[parser]: fix bad tokenization of hex strings (#4406)
this commit fixes parsing of hex strings. there were several issues with the hex string pre-parser, including: - modification of the string locations - incorrectly not exiting the state machine if a non-string token is encountered. this commit fixes the state machine, changes the pre-parser to leave the locations of hex strings unmodified as to minimize the changes to locations in the reformatted code vs source code. to see the effect, print out the reformatted code of the test cases included in this PR before and after this commit. this commit additionally adds several sanity checks to the pre-parser so that the chance of future tokenization bugs is minimized.
- Loading branch information
1 parent
66272e6
commit 9db1546
Showing
5 changed files
with
74 additions
and
21 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
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