-
Notifications
You must be signed in to change notification settings - Fork 49
[Integration] main (a0ed7e1) -> swift/main #282
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
Merged
Merged
Conversation
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
A quick pass to flip `/.../` out of the alternatives and into the main syntax. Still needs a bunch of work. Also add some commentary on a regex with `]` as the starting character.
…n. Split out Proposed solution from Detailed design. Parallelize the structure a bit better.
This isn't actually used, as we convert to a DSL custom character class, and then use that consumer logic.
Convert AST escape sequences that represent a scalar value (e.g `\f`, `n`, `\a`) into scalars in the DSL tree. This allows the matching engine to match against them.
Fix a dead link and example.
Rather than matching and not advancing the input, we should always return `nil` to never match against the trivia.
Previously we would check for an empty array of members when deciding whether an initial `]` is literal, or if the operands of a set operation are invalid. Switch to checking whether we have any semantic members instead.
Fix trivia in custom character classes
Add availability to public, SPI, and test symbols.
This should be unreachable, let's make sure of that. Doing so requires generalizing the handling of LocatedError a bit.
Previously we would always parse a "change matching option" sequence as a group, and for the isolated syntax e.g `(?x)`, we would have it implicitly wrap everything after in the same group by having it do a recursive parse. This matched the Oniguruma behavior for such isolated groups, and was easy to implement, but its behavior is quite unintuitive when it comes to alternations, as e.g `a(?x)b|c` becomes `a(?x:b|c)`, which may not be expected. Instead, let's follow PCRE's behavior by having such isolated cases affect the syntax options for the remainder of the current group, including across alternation branches. This is done by lexing such cases as atoms (as they aren't really group-like anymore), and having them change the syntax options when we encounter them. The existing scoping rules around groups take care of resetting the options when we exit the scope.
…cessing into main-integration-da89bf7
@swift-ci please test |
Compiler tests triggered here: swiftlang/swift#42386 |
Tests now have flag `-disable-availability-checking` because XCTests always test the just-built modules, rather than the modules in the OS.
Add remaining availability annotations.
…cessing into main-integration-da89bf7
@swift-ci please test |
rxwei
added a commit
to rxwei/swift
that referenced
this pull request
Apr 15, 2022
Friend PR: swiftlang/swift-experimental-string-processing#282. Also remove the `-enable-experimental-pairwise-build-block` flag when building regex modules as the feature is already on by default.
rxwei
added a commit
to swiftlang/swift
that referenced
this pull request
Apr 15, 2022
Friend PR: swiftlang/swift-experimental-string-processing#282. Also remove the `-enable-experimental-pairwise-build-block` flag when building regex modules as the feature is already on by default.
hamishknight
pushed a commit
to hamishknight/swift
that referenced
this pull request
Apr 22, 2022
Friend PR: swiftlang/swift-experimental-string-processing#282. Also remove the `-enable-experimental-pairwise-build-block` flag when building regex modules as the feature is already on by default.
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.
/
as delimited. Add a note about editor support./.../
as the main syntax#/.../#
Regex<Match, Captures>
alternative to regex proposalCharacterClass
API into RegexBuilder (MoveCharacterClass
API into RegexBuilder #254):
]
cases