We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dce4e12 commit df6a89aCopy full SHA for df6a89a
Sources/Parsing/Builders/OneOfBuilder.swift
@@ -144,3 +144,12 @@ public enum OneOfBuilder {
144
}
145
146
147
+
148
+extension OneOfBuilder.OptionalOneOf: ParserPrinter where Wrapped: ParserPrinter {
149
+ @inlinable
150
+ public func print(_ output: Wrapped.Output, into input: inout Wrapped.Input) throws {
151
+ guard let wrapped = self.wrapped
152
+ else { throw PrintingError.manyFailed([], at: input) }
153
+ try wrapped.print(output, into: &input)
154
+ }
155
+}
0 commit comments