@@ -234,10 +234,10 @@ struct VariadicsGenerator: ParsableCommand {
234234 // Emit concatenation builder.
235235 output ( " extension \( concatBuilderName) { \n " )
236236 output ( """
237- public static func buildBlock < \( genericParams) >(
238- combining next: R1, into combined: R0
237+ public static func buildPartialBlock < \( genericParams) >(
238+ accumulated: R0, next: R1
239239 ) -> \( regexTypeName) < \( matchType) > \( whereClause) {
240- .init(node: combined .regex.root.appending(next.regex.root))
240+ .init(node: accumulated .regex.root.appending(next.regex.root))
241241 }
242242 }
243243
@@ -248,14 +248,14 @@ struct VariadicsGenerator: ParsableCommand {
248248 // T + () = T
249249 output ( """
250250 extension \( concatBuilderName) {
251- public static func buildBlock <W0
251+ public static func buildPartialBlock <W0
252252 """ )
253253 outputForEach ( 0 ..< leftArity) {
254254 " , C \( $0) "
255255 }
256256 output ( """
257257 , R0: \( regexComponentProtocolName) , R1: \( regexComponentProtocolName) >(
258- combining next: R1, into combined: R0
258+ accumulated: R0, next: R1
259259 ) -> \( regexTypeName) <
260260 """ )
261261 if leftArity == 0 {
@@ -279,7 +279,7 @@ struct VariadicsGenerator: ParsableCommand {
279279 }
280280 output ( """
281281 {
282- .init(node: combined .regex.root.appending(next.regex.root))
282+ .init(node: accumulated .regex.root.appending(next.regex.root))
283283 }
284284 }
285285
@@ -491,10 +491,10 @@ struct VariadicsGenerator: ParsableCommand {
491491 } ( )
492492 output ( """
493493 extension \( altBuilderName) {
494- public static func buildBlock < \( genericParams) >(
495- combining next: R1, into combined: R0
494+ public static func buildPartialBlock < \( genericParams) >(
495+ accumulated: R0, next: R1
496496 ) -> ChoiceOf< \( matchType) > \( whereClause) {
497- .init(node: combined .regex.root.appendingAlternationCase(next.regex.root))
497+ .init(node: accumulated .regex.root.appendingAlternationCase(next.regex.root))
498498 }
499499 }
500500
@@ -521,7 +521,7 @@ struct VariadicsGenerator: ParsableCommand {
521521 let resultCaptures = ( 0 ..< arity) . map { " C \( $0) ? " } . joined ( separator: " , " )
522522 output ( """
523523 extension \( altBuilderName) {
524- public static func buildBlock < \( genericParams) >(_ regex: R) -> ChoiceOf<(W, \( resultCaptures) )> \( whereClause) {
524+ public static func buildPartialBlock < \( genericParams) >(first regex: R) -> ChoiceOf<(W, \( resultCaptures) )> \( whereClause) {
525525 .init(node: .alternation([regex.regex.root]))
526526 }
527527 }
0 commit comments