-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Regex literal runtime plumbing. #40487
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
Conversation
7e8c1ac
to
42234e9
Compare
@swift-ci please test |
4d540c3
to
4e376cf
Compare
4e376cf
to
f6c3186
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM modulo the question on whether the REQUIRES: libswift
is required for the test
@swift-ci please test |
@swift-ci please test windows |
- Frontend: Implicitly import `_StringProcessing` when frontend flag `-enable-experimental-string-processing` is set. - Type checker: Set a regex literal expression's type as `_StringProcessing.Regex<(Substring, DynamicCaptures)>`. `(Substring, DynamicCaptures)` is a temporary `Match` type that will help get us to an end-to-end working system. This will be replaced by actual type inference based a regex's pattern in a follow-up patch (soon). - SILGen: Lower a regex literal expression to a call to `_StringProcessing.Regex.init(_regexString:)`. - String processing runtime: Add `Regex`, `DynamicCaptures` (matching actual APIs in apple/swift-experimental-string-processing), and `Regex(_regexString:)`. Upcoming: - Build `_MatchingEngine` and `_StringProcessing` modules with sources from apple/swift-experimental-string-processing. - Replace `DynamicCaptures` with inferred capture types.
f6c3186
to
05363cd
Compare
@swift-ci please test and merge |
This PR is causing Swift to fail to build on Windows:
https://ci-external.swift.org/view/Pull%20Request/job/swift-PR-windows/19118 |
Fix windows build failure from #40487.
_StringProcessing
when frontend flag-enable-experimental-string-processing
is set._StringProcessing.Regex<(Substring, DynamicCaptures)>
.(Substring, DynamicCaptures)
is a temporaryMatch
type that will help get us to an end-to-end working system. This will be replaced by actual type inference based a regex's pattern in a follow-up patch (soon)._StringProcessing.Regex.init(_regexString:)
.Regex
,DynamicCaptures
(matching actual APIs in apple/swift-experimental-string-processing), andRegex(_regexString:)
.Upcoming:
_MatchingEngine
and_StringProcessing
modules with sources from apple/swift-experimental-string-processing.DynamicCaptures
with inferred capture types.