diff --git a/Sources/VariadicsGenerator/VariadicsGenerator.swift b/Sources/VariadicsGenerator/VariadicsGenerator.swift index f3793372d..cb6a2d42b 100644 --- a/Sources/VariadicsGenerator/VariadicsGenerator.swift +++ b/Sources/VariadicsGenerator/VariadicsGenerator.swift @@ -529,23 +529,22 @@ struct VariadicsGenerator: ParsableCommand { let matchType = arity == 0 ? "W" : "(W, " + (0.. String { - let newCaptureType = transformed ? "NewCapture" : baseMatchTypeName + func newMatchType(newCaptureType: String) -> String { return arity == 0 - ? "(W, \(newCaptureType))" - : "(W, \(newCaptureType), " + (0..(_ component: R) -> \(regexTypeName)<\(newMatchType(transformed: false))> \(whereClause) { + public func capture<\(genericParams)>(_ component: R) -> \(regexTypeName)<\(newMatchType(newCaptureType: "W"))> \(whereClause) { .init(node: .group(.capture, component.regex.root)) } public func capture<\(genericParams), NewCapture>( _ component: R, transform: @escaping (Substring) -> NewCapture - ) -> \(regexTypeName)<\(newMatchType(transformed: true))> \(whereClause) { + ) -> \(regexTypeName)<\(newMatchType(newCaptureType: "NewCapture"))> \(whereClause) { .init(node: .groupTransform( .capture, component.regex.root, @@ -556,7 +555,7 @@ struct VariadicsGenerator: ParsableCommand { public func tryCapture<\(genericParams), NewCapture>( _ component: R, transform: @escaping (Substring) throws -> NewCapture - ) -> \(regexTypeName)<\(newMatchType(transformed: true))> \(whereClause) { + ) -> \(regexTypeName)<\(newMatchType(newCaptureType: "NewCapture"))> \(whereClause) { .init(node: .groupTransform( .capture, component.regex.root, @@ -567,7 +566,7 @@ struct VariadicsGenerator: ParsableCommand { public func tryCapture<\(genericParams), NewCapture>( _ component: R, transform: @escaping (Substring) -> NewCapture? - ) -> \(regexTypeName)<\(newMatchType(transformed: true))> \(whereClause) { + ) -> \(regexTypeName)<\(newMatchType(newCaptureType: "NewCapture"))> \(whereClause) { .init(node: .groupTransform( .capture, component.regex.root, @@ -580,14 +579,14 @@ struct VariadicsGenerator: ParsableCommand { public func capture<\(genericParams)>( @RegexBuilder _ component: () -> R - ) -> \(regexTypeName)<\(newMatchType(transformed: false))> \(whereClause) { + ) -> \(regexTypeName)<\(newMatchType(newCaptureType: "W"))> \(whereClause) { .init(node: .group(.capture, component().regex.root)) } public func capture<\(genericParams), NewCapture>( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture - ) -> \(regexTypeName)<\(newMatchType(transformed: true))> \(whereClause) { + ) -> \(regexTypeName)<\(newMatchType(newCaptureType: "NewCapture"))> \(whereClause) { .init(node: .groupTransform( .capture, component().regex.root, @@ -599,7 +598,7 @@ struct VariadicsGenerator: ParsableCommand { public func tryCapture<\(genericParams), NewCapture>( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) throws -> NewCapture - ) -> \(regexTypeName)<\(newMatchType(transformed: true))> \(whereClause) { + ) -> \(regexTypeName)<\(newMatchType(newCaptureType: "NewCapture"))> \(whereClause) { .init(node: .groupTransform( .capture, component().regex.root, @@ -611,7 +610,7 @@ struct VariadicsGenerator: ParsableCommand { public func tryCapture<\(genericParams), NewCapture>( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture? - ) -> \(regexTypeName)<\(newMatchType(transformed: true))> \(whereClause) { + ) -> \(regexTypeName)<\(newMatchType(newCaptureType: "NewCapture"))> \(whereClause) { .init(node: .groupTransform( .capture, component().regex.root, diff --git a/Sources/_StringProcessing/RegexDSL/Variadics.swift b/Sources/_StringProcessing/RegexDSL/Variadics.swift index 14532c9a9..450270664 100644 --- a/Sources/_StringProcessing/RegexDSL/Variadics.swift +++ b/Sources/_StringProcessing/RegexDSL/Variadics.swift @@ -2265,13 +2265,13 @@ extension AlternationBuilder { } // MARK: - Non-builder capture arity 0 -public func capture(_ component: R) -> Regex<(W, Substring)> where R.Match == W { +public func capture(_ component: R) -> Regex<(Substring, W)> where R.Match == W { .init(node: .group(.capture, component.regex.root)) } public func capture( _ component: R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture)> where R.Match == W { +) -> Regex<(Substring, NewCapture)> where R.Match == W { .init(node: .groupTransform( .capture, component.regex.root, @@ -2282,7 +2282,7 @@ public func capture( public func tryCapture( _ component: R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture)> where R.Match == W { +) -> Regex<(Substring, NewCapture)> where R.Match == W { .init(node: .groupTransform( .capture, component.regex.root, @@ -2293,7 +2293,7 @@ public func tryCapture( public func tryCapture( _ component: R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture)> where R.Match == W { +) -> Regex<(Substring, NewCapture)> where R.Match == W { .init(node: .groupTransform( .capture, component.regex.root, @@ -2306,14 +2306,14 @@ public func tryCapture( public func capture( @RegexBuilder _ component: () -> R -) -> Regex<(W, Substring)> where R.Match == W { +) -> Regex<(Substring, W)> where R.Match == W { .init(node: .group(.capture, component().regex.root)) } public func capture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture)> where R.Match == W { +) -> Regex<(Substring, NewCapture)> where R.Match == W { .init(node: .groupTransform( .capture, component().regex.root, @@ -2325,7 +2325,7 @@ public func capture( public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture)> where R.Match == W { +) -> Regex<(Substring, NewCapture)> where R.Match == W { .init(node: .groupTransform( .capture, component().regex.root, @@ -2337,7 +2337,7 @@ public func tryCapture( public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture)> where R.Match == W { +) -> Regex<(Substring, NewCapture)> where R.Match == W { .init(node: .groupTransform( .capture, component().regex.root, @@ -2347,13 +2347,13 @@ public func tryCapture( } // MARK: - Non-builder capture arity 1 -public func capture(_ component: R) -> Regex<(W, Substring, C0)> where R.Match == (W, C0) { +public func capture(_ component: R) -> Regex<(Substring, W, C0)> where R.Match == (W, C0) { .init(node: .group(.capture, component.regex.root)) } public func capture( _ component: R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0)> where R.Match == (W, C0) { +) -> Regex<(Substring, NewCapture, C0)> where R.Match == (W, C0) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2364,7 +2364,7 @@ public func capture( public func tryCapture( _ component: R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0)> where R.Match == (W, C0) { +) -> Regex<(Substring, NewCapture, C0)> where R.Match == (W, C0) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2375,7 +2375,7 @@ public func tryCapture( public func tryCapture( _ component: R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0)> where R.Match == (W, C0) { +) -> Regex<(Substring, NewCapture, C0)> where R.Match == (W, C0) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2388,14 +2388,14 @@ public func tryCapture( public func capture( @RegexBuilder _ component: () -> R -) -> Regex<(W, Substring, C0)> where R.Match == (W, C0) { +) -> Regex<(Substring, W, C0)> where R.Match == (W, C0) { .init(node: .group(.capture, component().regex.root)) } public func capture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0)> where R.Match == (W, C0) { +) -> Regex<(Substring, NewCapture, C0)> where R.Match == (W, C0) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2407,7 +2407,7 @@ public func capture( public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0)> where R.Match == (W, C0) { +) -> Regex<(Substring, NewCapture, C0)> where R.Match == (W, C0) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2419,7 +2419,7 @@ public func tryCapture( public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0)> where R.Match == (W, C0) { +) -> Regex<(Substring, NewCapture, C0)> where R.Match == (W, C0) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2429,13 +2429,13 @@ public func tryCapture( } // MARK: - Non-builder capture arity 2 -public func capture(_ component: R) -> Regex<(W, Substring, C0, C1)> where R.Match == (W, C0, C1) { +public func capture(_ component: R) -> Regex<(Substring, W, C0, C1)> where R.Match == (W, C0, C1) { .init(node: .group(.capture, component.regex.root)) } public func capture( _ component: R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1)> where R.Match == (W, C0, C1) { +) -> Regex<(Substring, NewCapture, C0, C1)> where R.Match == (W, C0, C1) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2446,7 +2446,7 @@ public func capture( public func tryCapture( _ component: R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1)> where R.Match == (W, C0, C1) { +) -> Regex<(Substring, NewCapture, C0, C1)> where R.Match == (W, C0, C1) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2457,7 +2457,7 @@ public func tryCapture( public func tryCapture( _ component: R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1)> where R.Match == (W, C0, C1) { +) -> Regex<(Substring, NewCapture, C0, C1)> where R.Match == (W, C0, C1) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2470,14 +2470,14 @@ public func tryCapture( public func capture( @RegexBuilder _ component: () -> R -) -> Regex<(W, Substring, C0, C1)> where R.Match == (W, C0, C1) { +) -> Regex<(Substring, W, C0, C1)> where R.Match == (W, C0, C1) { .init(node: .group(.capture, component().regex.root)) } public func capture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1)> where R.Match == (W, C0, C1) { +) -> Regex<(Substring, NewCapture, C0, C1)> where R.Match == (W, C0, C1) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2489,7 +2489,7 @@ public func capture( public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1)> where R.Match == (W, C0, C1) { +) -> Regex<(Substring, NewCapture, C0, C1)> where R.Match == (W, C0, C1) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2501,7 +2501,7 @@ public func tryCapture( public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1)> where R.Match == (W, C0, C1) { +) -> Regex<(Substring, NewCapture, C0, C1)> where R.Match == (W, C0, C1) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2511,13 +2511,13 @@ public func tryCapture( } // MARK: - Non-builder capture arity 3 -public func capture(_ component: R) -> Regex<(W, Substring, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { +public func capture(_ component: R) -> Regex<(Substring, W, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { .init(node: .group(.capture, component.regex.root)) } public func capture( _ component: R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { +) -> Regex<(Substring, NewCapture, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2528,7 +2528,7 @@ public func capture( public func tryCapture( _ component: R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { +) -> Regex<(Substring, NewCapture, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2539,7 +2539,7 @@ public func tryCapture( public func tryCapture( _ component: R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { +) -> Regex<(Substring, NewCapture, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2552,14 +2552,14 @@ public func tryCapture( public func capture( @RegexBuilder _ component: () -> R -) -> Regex<(W, Substring, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { +) -> Regex<(Substring, W, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { .init(node: .group(.capture, component().regex.root)) } public func capture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { +) -> Regex<(Substring, NewCapture, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2571,7 +2571,7 @@ public func capture( public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { +) -> Regex<(Substring, NewCapture, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2583,7 +2583,7 @@ public func tryCapture( public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { +) -> Regex<(Substring, NewCapture, C0, C1, C2)> where R.Match == (W, C0, C1, C2) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2593,13 +2593,13 @@ public func tryCapture( } // MARK: - Non-builder capture arity 4 -public func capture(_ component: R) -> Regex<(W, Substring, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { +public func capture(_ component: R) -> Regex<(Substring, W, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { .init(node: .group(.capture, component.regex.root)) } public func capture( _ component: R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2610,7 +2610,7 @@ public func capture( public func tryCapture( _ component: R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2621,7 +2621,7 @@ public func tryCapture( public func tryCapture( _ component: R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2634,14 +2634,14 @@ public func tryCapture( public func capture( @RegexBuilder _ component: () -> R -) -> Regex<(W, Substring, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { +) -> Regex<(Substring, W, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { .init(node: .group(.capture, component().regex.root)) } public func capture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2653,7 +2653,7 @@ public func capture( public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2665,7 +2665,7 @@ public func tryCapture( public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3)> where R.Match == (W, C0, C1, C2, C3) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2675,13 +2675,13 @@ public func tryCapture( } // MARK: - Non-builder capture arity 5 -public func capture(_ component: R) -> Regex<(W, Substring, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { +public func capture(_ component: R) -> Regex<(Substring, W, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { .init(node: .group(.capture, component.regex.root)) } public func capture( _ component: R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2692,7 +2692,7 @@ public func capture( public func tryCapture( _ component: R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2703,7 +2703,7 @@ public func tryCapture( public func tryCapture( _ component: R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2716,14 +2716,14 @@ public func tryCapture( public func capture( @RegexBuilder _ component: () -> R -) -> Regex<(W, Substring, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { +) -> Regex<(Substring, W, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { .init(node: .group(.capture, component().regex.root)) } public func capture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2735,7 +2735,7 @@ public func capture( public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2747,7 +2747,7 @@ public func tryCapture( public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4)> where R.Match == (W, C0, C1, C2, C3, C4) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2757,13 +2757,13 @@ public func tryCapture( } // MARK: - Non-builder capture arity 6 -public func capture(_ component: R) -> Regex<(W, Substring, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { +public func capture(_ component: R) -> Regex<(Substring, W, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { .init(node: .group(.capture, component.regex.root)) } public func capture( _ component: R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2774,7 +2774,7 @@ public func capture( public func tryCapture( _ component: R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2785,7 +2785,7 @@ public func tryCapture( public func tryCapture( _ component: R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2798,14 +2798,14 @@ public func tryCapture( public func capture( @RegexBuilder _ component: () -> R -) -> Regex<(W, Substring, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { +) -> Regex<(Substring, W, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { .init(node: .group(.capture, component().regex.root)) } public func capture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2817,7 +2817,7 @@ public func capture( public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2829,7 +2829,7 @@ public func tryCapture( public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5)> where R.Match == (W, C0, C1, C2, C3, C4, C5) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2839,13 +2839,13 @@ public func tryCapture( } // MARK: - Non-builder capture arity 7 -public func capture(_ component: R) -> Regex<(W, Substring, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { +public func capture(_ component: R) -> Regex<(Substring, W, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { .init(node: .group(.capture, component.regex.root)) } public func capture( _ component: R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2856,7 +2856,7 @@ public func capture public func tryCapture( _ component: R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2867,7 +2867,7 @@ public func tryCapture( _ component: R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2880,14 +2880,14 @@ public func tryCapture( @RegexBuilder _ component: () -> R -) -> Regex<(W, Substring, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { +) -> Regex<(Substring, W, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { .init(node: .group(.capture, component().regex.root)) } public func capture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2899,7 +2899,7 @@ public func capture public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2911,7 +2911,7 @@ public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2921,13 +2921,13 @@ public func tryCapture(_ component: R) -> Regex<(W, Substring, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { +public func capture(_ component: R) -> Regex<(Substring, W, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { .init(node: .group(.capture, component.regex.root)) } public func capture( _ component: R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2938,7 +2938,7 @@ public func capture( _ component: R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2949,7 +2949,7 @@ public func tryCapture( _ component: R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { .init(node: .groupTransform( .capture, component.regex.root, @@ -2962,14 +2962,14 @@ public func tryCapture( @RegexBuilder _ component: () -> R -) -> Regex<(W, Substring, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { +) -> Regex<(Substring, W, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { .init(node: .group(.capture, component().regex.root)) } public func capture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2981,7 +2981,7 @@ public func capture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { .init(node: .groupTransform( .capture, component().regex.root, @@ -2993,7 +2993,7 @@ public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7) { .init(node: .groupTransform( .capture, component().regex.root, @@ -3003,13 +3003,13 @@ public func tryCapture(_ component: R) -> Regex<(W, Substring, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { +public func capture(_ component: R) -> Regex<(Substring, W, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { .init(node: .group(.capture, component.regex.root)) } public func capture( _ component: R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { .init(node: .groupTransform( .capture, component.regex.root, @@ -3020,7 +3020,7 @@ public func capture( _ component: R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { .init(node: .groupTransform( .capture, component.regex.root, @@ -3031,7 +3031,7 @@ public func tryCapture( _ component: R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { .init(node: .groupTransform( .capture, component.regex.root, @@ -3044,14 +3044,14 @@ public func tryCapture( @RegexBuilder _ component: () -> R -) -> Regex<(W, Substring, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { +) -> Regex<(Substring, W, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { .init(node: .group(.capture, component().regex.root)) } public func capture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { .init(node: .groupTransform( .capture, component().regex.root, @@ -3063,7 +3063,7 @@ public func capture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) throws -> NewCapture -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { .init(node: .groupTransform( .capture, component().regex.root, @@ -3075,7 +3075,7 @@ public func tryCapture( @RegexBuilder _ component: () -> R, transform: @escaping (Substring) -> NewCapture? -) -> Regex<(W, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { +) -> Regex<(Substring, NewCapture, C0, C1, C2, C3, C4, C5, C6, C7, C8)> where R.Match == (W, C0, C1, C2, C3, C4, C5, C6, C7, C8) { .init(node: .groupTransform( .capture, component().regex.root,