More regex error recovery in reScanSlashToken#174
Merged
sandersn merged 6 commits intomicrosoft:mainfrom Dec 16, 2024
sandersn:more-regex-rescan-error-recovery
Merged
More regex error recovery in reScanSlashToken#174sandersn merged 6 commits intomicrosoft:mainfrom sandersn:more-regex-rescan-error-recovery
sandersn merged 6 commits intomicrosoft:mainfrom
sandersn:more-regex-rescan-error-recovery
Conversation
This still does NOT include the ability to log diagnostics from microsoft/TypeScript#55600. But it does match tsc's smarter regex-end detection for unterminated regexes (which you get a lot when parsing JSX as JS).
jakebailey
reviewed
Dec 13, 2024
jakebailey
reviewed
Dec 13, 2024
1. Flip bad ts-to-go conversion of truthiness check. 2. Re-add simple "Untermined regular expression literal" error.
jakebailey
approved these changes
Dec 16, 2024
Member
|
(Approved but this needs a format / |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This still does NOT include the ability to log diagnostics from microsoft/TypeScript#55600. But it does match tsc's smarter regex-end detection for unterminated regexes (which you get a lot when parsing JSX as JS).
Note that
s.pos++gets pulled back out of the main loop into the post-loop processing, where it was in tsc.