-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit 164ca7f
[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 164ca7fCopy full SHA for 164ca7f
File tree
Expand file treeCollapse file tree
1 file changed
+853
-332
lines changedFilter options
- proposals
Expand file treeCollapse file tree
1 file changed
+853
-332
lines changed
0 commit comments