diff --git a/Sources/Parsing/Parsers/Zip.swift b/Sources/Parsing/Parsers/Take.swift similarity index 98% rename from Sources/Parsing/Parsers/Zip.swift rename to Sources/Parsing/Parsers/Take.swift index 38f20eaa2a..f41d891d61 100644 --- a/Sources/Parsing/Parsers/Zip.swift +++ b/Sources/Parsing/Parsers/Take.swift @@ -13,7 +13,8 @@ extension Parser { /// var input = "-1.5,1"[...].utf8 /// let output = Double.parser() /// .skip(StartsWith(",")) - /// .take(CGPoint.parser()) + /// .take(Double.parser()) + /// .map(Point.init) /// .parse(&input) // => Point(x: -1.5, y: 1) /// precondition(Substring(input) == "") /// diff --git a/Tests/ParsingTests/ZipTests.swift b/Tests/ParsingTests/TakeTests.swift similarity index 96% rename from Tests/ParsingTests/ZipTests.swift rename to Tests/ParsingTests/TakeTests.swift index 15ccf323b2..6da70318ad 100644 --- a/Tests/ParsingTests/ZipTests.swift +++ b/Tests/ParsingTests/TakeTests.swift @@ -1,7 +1,7 @@ import Parsing import XCTest -final class ZipTests: XCTestCase { +final class TakeTests: XCTestCase { func testTake2Success() { var input = "12345"[...] XCTAssert(try ("1", "2") == XCTUnwrap(First().take(First()).parse(&input)))