Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Sources/RegexBuilder/DSL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
@available(SwiftStdlib 5.7, *)
extension Regex {
/// Creates a regular expression using a RegexBuilder closure.
public init<Content: RegexComponent>(
@RegexComponentBuilder _ content: () -> Content
) where Content.RegexOutput == Output {
public init(
@RegexComponentBuilder _ content: () -> some RegexComponent<Output>
) {
self = content().regex
}
}
Expand Down Expand Up @@ -91,9 +91,9 @@ public struct One<Output>: RegexComponent {
public var regex: Regex<Output>

/// Creates a regex component that matches the given component exactly once.
public init<Component: RegexComponent>(
_ component: Component
) where Component.RegexOutput == Output {
public init(
_ component: some RegexComponent<Output>
) {
self.regex = component.regex
}
}
Expand Down
2,729 changes: 1,466 additions & 1,263 deletions Sources/RegexBuilder/Variadics.swift

Large diffs are not rendered by default.

Loading