Skip to content

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