Skip to content

Commit 164ca7f

Browse files
rxweinatecook1000stephentyroneairspeedswift
authored
[SE-0351] Revise regex builder proposal (#1634)
* [SE-0351] Revise regex builder proposal Revision: - Capture takes throwing closures. (swiftlang/swift-experimental-string-processing#261) - Rename `Output` associated type to `RegexOutput`. (swiftlang/swift-experimental-string-processing#281) - Define primary associated type for `RegexComponent`. Clarification: - Clarify that `RegexComponent` and `Regex: RegexComponent` will be in the stdlib, not in `RegexBuilder`. - Make detailed design driven by example and move API definition to a collapsible. This is so that the complex result builder machinery won't obscure the API design. - Add alternative considered section about unifying `Capture` and `TryCapture`. * Add section about anchors and lookaheads * Add section re `mapOutput` * Move mapOutput to Regex instead of RegexComponent * Address comments. * Minor fix in RegexComponent declaration * Capture transform shouldn't be restricted to taking a `Substring` * Fix syntax highlighting * Update 0351-regex-builder.md * Revise `RegexComponentBuilder.buildPartialBlock(first:)`. Also fix broken links. * Update 0351-regex-builder.md Co-authored-by: Nate Cook <[email protected]> Co-authored-by: Stephen Canon <[email protected]> Co-authored-by: Ben Cohen <[email protected]>
1 parent 04b793b commit 164ca7f

File tree

1 file changed

+853
-332
lines changed

1 file changed

+853
-332
lines changed

0 commit comments

Comments
 (0)