From 54a5ab4022952e37d881d8a95f00c917003c9017 Mon Sep 17 00:00:00 2001 From: Roman <2621122+RoBo-Inc@users.noreply.github.com> Date: Wed, 9 Oct 2024 17:37:08 +0700 Subject: [PATCH 1/2] Fix a typo --- Sources/Parsing/Builders/OneOfBuilder.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Parsing/Builders/OneOfBuilder.swift b/Sources/Parsing/Builders/OneOfBuilder.swift index e1f69d9c47..7031cc1fbf 100644 --- a/Sources/Parsing/Builders/OneOfBuilder.swift +++ b/Sources/Parsing/Builders/OneOfBuilder.swift @@ -14,7 +14,7 @@ /// } /// let money = Parse { currency; Digits() } /// -/// try currency.parse("$100") // (.usd, 100) +/// try money.parse("$100") // (.usd, 100) /// ``` @resultBuilder public enum OneOfBuilder { From 9ed3bd8661126379c720b94967ea7694d061dfea Mon Sep 17 00:00:00 2001 From: Roman <2621122+RoBo-Inc@users.noreply.github.com> Date: Fri, 11 Oct 2024 14:46:42 +0700 Subject: [PATCH 2/2] Fix mistake in docs --- Sources/Parsing/ParserPrinters/Printing.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Parsing/ParserPrinters/Printing.swift b/Sources/Parsing/ParserPrinters/Printing.swift index 706a0c5267..b4a6298370 100644 --- a/Sources/Parsing/ParserPrinters/Printing.swift +++ b/Sources/Parsing/ParserPrinters/Printing.swift @@ -7,14 +7,14 @@ extension Parser { /// a single space: /// /// ```swift - /// let spaces = Skip { Prefix { $0.isWhitespace } }.printing(" ") + /// let spaces = Skip { Prefix(while: \.isWhitespace) }.printing(" ") /// /// var input = " 123"[...] /// try spaces.parse(&input) // () /// input // "123" /// - /// spaces.print(to: &input) - /// input // "123 " + /// try spaces.print(into: &input) + /// input // " 123" /// ``` /// /// - Parameter printer: A printer.