Skip to content

Rename RegexProtocol to RegexComponent and RegexBuilder to RegexComponentBuilder. #200

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 1 commit into from
Mar 8, 2022

Conversation

rxwei
Copy link
Contributor

@rxwei rxwei commented Mar 4, 2022

We've decided to use RegexComponent for the protocol, and use RegexComponentBuilder for the builder type since we want the user to import a module named RegexBuilder to get the DSL.

@rxwei rxwei requested review from milseman and natecook1000 March 4, 2022 09:12
@milseman
Copy link
Member

milseman commented Mar 4, 2022

With this change, should String.match(_:) take a Regex instead?

One option is an ABI that takes Regex and an inlinable API that's generic and just passes off the static var. (I've also been wondering where the ABI falls for operating between generics and existential). WDYT?

@rxwei
Copy link
Contributor Author

rxwei commented Mar 4, 2022

Sure. My main concern was not about ABI, but whether it makes sense to have matching API on a RegexComponent. As we sometimes want to use a custom regex component as a regex (to obtain its transformed Match), it seems like calling it "regex component" may not be entirely appropriate.

@milseman
Copy link
Member

milseman commented Mar 4, 2022

@natecook1000 how are option scopes and global options coming along? That might help clarify the relationship between a Regex, RegexProtocol, RegexComponent, etc.

@rxwei
Copy link
Contributor Author

rxwei commented Mar 8, 2022

@swift-ci please test

…exComponentBuilder`.

We've decided to use `RegexComponent` for the protocol, and use `RegexComponentBuilder` for the builder type since we want the user to import a module named `RegexBuilder` to get the DSL.
@rxwei rxwei force-pushed the regex-component branch from 1a72e37 to db24c1c Compare March 8, 2022 20:58
@rxwei rxwei changed the title Rename 'RegexProtocol' to 'RegexComponent'. Rename 'RegexProtocol' to 'RegexComponent' and RegexBuilder to RegexComponentBuilder. Mar 8, 2022
@rxwei rxwei changed the title Rename 'RegexProtocol' to 'RegexComponent' and RegexBuilder to RegexComponentBuilder. Rename RegexProtocol to RegexComponent and RegexBuilder to RegexComponentBuilder. Mar 8, 2022
@rxwei
Copy link
Contributor Author

rxwei commented Mar 8, 2022

@swift-ci please test

@rxwei
Copy link
Contributor Author

rxwei commented Mar 8, 2022

We converged on this solution in a meeting so I'll go ahead and merge. Any feedback is always welcome.

@rxwei rxwei merged commit cd3ad6d into swiftlang:main Mar 8, 2022
@rxwei rxwei deleted the regex-component branch March 9, 2022 00:30
rxwei added a commit to rxwei/swift-experimental-string-processing that referenced this pull request Mar 18, 2022
…exComponentBuilder`. (swiftlang#200)

We've decided to use `RegexComponent` for the protocol, and use `RegexComponentBuilder` for the builder type since we want the user to import a module named `RegexBuilder` to get the DSL.
rxwei added a commit to rxwei/swift-experimental-string-processing that referenced this pull request Mar 21, 2022
…exComponentBuilder`. (swiftlang#200)

We've decided to use `RegexComponent` for the protocol, and use `RegexComponentBuilder` for the builder type since we want the user to import a module named `RegexBuilder` to get the DSL.
rxwei added a commit to rxwei/swift-experimental-string-processing that referenced this pull request Mar 21, 2022
…exComponentBuilder`. (swiftlang#200)

We've decided to use `RegexComponent` for the protocol, and use `RegexComponentBuilder` for the builder type since we want the user to import a module named `RegexBuilder` to get the DSL.
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.

2 participants