(_ parsers: [P]) -> Parsers.OneOfMany
{ + .init(parsers) + } + + @inlinable + static public func buildBlock
(_ parser: P) -> P where P: Parser {
+ parser
+ }
+
+ @inlinable
+ public static func buildEither (_ parser: P?) -> Conditional > {
+ parser.map(Conditional.first) ?? .second(.init())
+ }
+
+ @inlinable
+ public static func buildLimitedAvailability (
+ _ parser: P?
+ ) -> Conditional > {
+ parser.map(Conditional.first) ?? .second(.init())
+ }
+}
diff --git a/0176-parser-errors-pt1/swift-parsing/Sources/Parsing/Builders/ParserBuilder.swift b/0176-parser-errors-pt1/swift-parsing/Sources/Parsing/Builders/ParserBuilder.swift
new file mode 100644
index 00000000..7c0183cc
--- /dev/null
+++ b/0176-parser-errors-pt1/swift-parsing/Sources/Parsing/Builders/ParserBuilder.swift
@@ -0,0 +1,45 @@
+/// A custom parameter attribute that constructs a parser that attempts to run a number of parsers,
+/// one after the other, and accumulates their outputs.
+///
+/// See ``Parse`` for an entry point into this builder.
+@resultBuilder
+public enum ParserBuilder {
+ @inlinable
+ public static func buildBlock (_ parser: P) -> P where P: Parser {
+ parser
+ }
+
+ @inlinable
+ public static func buildEither (_ parser: P?) -> P? where P: Parser {
+ parser
+ }
+
+ @inlinable
+ public static func buildIf (_ parser: P?) -> Parsers.OptionalVoid {
+ .init(wrapped: parser)
+ }
+
+ @inlinable
+ public static func buildLimitedAvailability (_ parser: P?) -> P? where P: Parser {
+ parser
+ }
+
+ @inlinable
+ public static func buildLimitedAvailability (_ parser: P?) -> Parsers.OptionalVoid {
+ .init(wrapped: parser)
+ }
+}
diff --git a/0176-parser-errors-pt1/swift-parsing/Sources/Parsing/Builders/Variadics.swift b/0176-parser-errors-pt1/swift-parsing/Sources/Parsing/Builders/Variadics.swift
new file mode 100644
index 00000000..068d3a3d
--- /dev/null
+++ b/0176-parser-errors-pt1/swift-parsing/Sources/Parsing/Builders/Variadics.swift
@@ -0,0 +1,7662 @@
+// BEGIN AUTO-GENERATED CONTENT
+
+extension Parsers {
+ public struct ZipOO