-
Notifications
You must be signed in to change notification settings - Fork 50
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
Conversation
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.
This is exposing new public decls. I’m not sure why this is better than take 2.
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.
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 |
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.
Minor code cleanup: what about an initializer that takes an optional behavior? Then this can just be .init(behavior)
for these call sites.
add comments
@swift-ci please test |
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.
LGTM
Make variadic builder overloads AEIC (take 3)
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.