Skip to content

For Reference: Update swift/release/6.0 with main #742

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

Closed

Conversation

milseman
Copy link
Member

No description provided.

natecook1000 and others added 5 commits March 27, 2024 12:07
This is based heavily off the work in swiftlang#590, rebased onto main, with
some changes to remove even more consumer uses. Consumer functions
only have two remaining uses: non-ASCII ranges and Unicode lookups
(for things like general category, binary properties, name, etc.).

This change primarily treats custom character classes as alternations
around their contents, with set operations emitted as instructions
instead of implemented via consumer function.
…#735)

This fixes an issue where capture groups inside a positive lookahead
were being reset even upon successful matching of the lookahead. For
example, with the pattern `/(?=(\d))/`, matching against a string like
`"abc1"` should result in the output `("", "1")`. However, accessing
the output traps instead, since the range data for capture 1 is
missing even on success.

This change resolves the issue by adding a boolean payload to the
`fail` instruction that indicates whether to preserve captures when
resetting the matching state, which allows any captures inside a
lookahead to persist after success.

Fixes swiftlang#713.
Support change matching options in Regex refactoring
[swift/main] Support change matching options in Regex refactoring
@milseman milseman closed this Jun 5, 2024
@milseman milseman deleted the update_swift_main branch June 6, 2024 14:23
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.

3 participants