@@ -234,10 +234,10 @@ struct VariadicsGenerator: ParsableCommand {
234
234
// Emit concatenation builder.
235
235
output ( " extension \( concatBuilderName) { \n " )
236
236
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
239
239
) -> \( regexTypeName) < \( matchType) > \( whereClause) {
240
- .init(node: combined .regex.root.appending(next.regex.root))
240
+ .init(node: accumulated .regex.root.appending(next.regex.root))
241
241
}
242
242
}
243
243
@@ -248,14 +248,14 @@ struct VariadicsGenerator: ParsableCommand {
248
248
// T + () = T
249
249
output ( """
250
250
extension \( concatBuilderName) {
251
- public static func buildBlock <W0
251
+ public static func buildPartialBlock <W0
252
252
""" )
253
253
outputForEach ( 0 ..< leftArity) {
254
254
" , C \( $0) "
255
255
}
256
256
output ( """
257
257
, R0: \( regexComponentProtocolName) , R1: \( regexComponentProtocolName) >(
258
- combining next: R1, into combined: R0
258
+ accumulated: R0, next: R1
259
259
) -> \( regexTypeName) <
260
260
""" )
261
261
if leftArity == 0 {
@@ -279,7 +279,7 @@ struct VariadicsGenerator: ParsableCommand {
279
279
}
280
280
output ( """
281
281
{
282
- .init(node: combined .regex.root.appending(next.regex.root))
282
+ .init(node: accumulated .regex.root.appending(next.regex.root))
283
283
}
284
284
}
285
285
@@ -491,10 +491,10 @@ struct VariadicsGenerator: ParsableCommand {
491
491
} ( )
492
492
output ( """
493
493
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
496
496
) -> ChoiceOf< \( matchType) > \( whereClause) {
497
- .init(node: combined .regex.root.appendingAlternationCase(next.regex.root))
497
+ .init(node: accumulated .regex.root.appendingAlternationCase(next.regex.root))
498
498
}
499
499
}
500
500
@@ -521,7 +521,7 @@ struct VariadicsGenerator: ParsableCommand {
521
521
let resultCaptures = ( 0 ..< arity) . map { " C \( $0) ? " } . joined ( separator: " , " )
522
522
output ( """
523
523
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) {
525
525
.init(node: .alternation([regex.regex.root]))
526
526
}
527
527
}
0 commit comments