Skip to content

Make variadic builder overloads AEIC (take 3) #520

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 2 commits into from
Jun 29, 2022
Merged

Conversation

Azoy
Copy link
Contributor

@Azoy Azoy commented Jun 28, 2022

This moves _RegexFactory into s-p as a public underscored facility and de-publicizes some of the types in DSLTree, most notably Node. There are a few types that are still public spi for regexbuilder to work however.

@Azoy Azoy requested review from milseman, stephentyrone and rxwei June 28, 2022 23:28
Copy link
Contributor

@rxwei rxwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exposing new public decls. I’m not sure why this is better than take 2.

Copy link
Member

@milseman milseman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking much better. Let's continue to think if we can get a little more @_spi on or closer to _RegexFactory, but this is better than putting Node into our ABI.

_ component: some RegexComponent,
_ behavior: RegexRepetitionBehavior? = nil
) -> Regex<Output> {
let kind: DSLTree.QuantificationKind = behavior.map { .explicit($0.dslTreeKind) } ?? .default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor code cleanup: what about an initializer that takes an optional behavior? Then this can just be .init(behavior) for these call sites.

@Azoy
Copy link
Contributor Author

Azoy commented Jun 29, 2022

@swift-ci please test

Copy link
Member

@milseman milseman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Azoy Azoy merged commit 290ce10 into swiftlang:main Jun 29, 2022
@Azoy Azoy deleted the aeic-3 branch June 29, 2022 22:23
Azoy added a commit to Azoy/swift-experimental-string-processing that referenced this pull request Jun 29, 2022
Make variadic builder overloads AEIC (take 3)
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.

3 participants