Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More regex error recovery in reScanSlashToken #174

Merged
merged 6 commits into from
Dec 16, 2024

Conversation

sandersn
Copy link
Member

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.

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).
1. Flip bad ts-to-go conversion of truthiness check.
2. Re-add simple "Untermined regular expression literal" error.
@jakebailey
Copy link
Member

(Approved but this needs a format / hereby lint --fix.)

@sandersn sandersn merged commit fd6ab05 into microsoft:main Dec 16, 2024
12 checks passed
@sandersn sandersn deleted the more-regex-rescan-error-recovery branch December 16, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants