Skip to content

Releases: pointfreeco/swift-parsing

0.14.1

16 Jan 18:03
3432cb8
Compare
Choose a tag to compare

What's Changed

  • Fixed: Addressed a regression in printing introduced in 0.14.0 (#369).

Full Changelog: 0.14.0...0.14.1

0.14.0

14 Jan 18:03
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.13.0...0.14.0

0.13.0

30 Jul 22:36
a0e7d73
Compare
Choose a tag to compare

What's Changed

  • Changed: Bump to Case Paths 1.0 (#306).
  • Fixed: Remove unused package dependencies (#303).
  • Fixed: Remove a Swift 5.9 warning (#304).
  • Infrastructure: Improve Date parser demo (#305).

Full Changelog: 0.12.1...0.13.0

0.12.1

26 May 16:33
27c941b
Compare
Choose a tag to compare

What's Changed

  • Fixed: Formatted parser now only consumes what it matches, and not the rest of the string (#301).
  • Infrastructure: Fix seconds mapping in Date benchmark (thanks @jacoblapworth, #295).

New Contributors

Full Changelog: 0.12.0...0.12.1

0.12.0

31 Mar 15:54
c6e2241
Compare
Choose a tag to compare

What's Changed

Warning: This release contains breaking changes in order to support Swift 5.8's rewritten result builder implementation. While the package will build for Swift 5.7, we recommend delaying this upgrade till you can use Swift 5.8, as the changes impact compile time performance of ParserBuilder and OneOfBuilder.

  • Added: Swift 5.8 Support (thanks @JaapWijnen, #289). Note: due to result builder changes in Swift 5.8, code that compiled just fine in Swift 5.7 and Parsing 0.11.0 and earlier may be source incompatible in Swift 5.8 and this Parsing release.

    See this discussion for more details.

  • Added: Parsers can now be implemented in the SwiftUI "body" style:

    struct UserParser: Parser {
      var body: some Parser<Substring, User> {
        Parse(User.init(id:name:isAdmin:)) {
          Int.parser()
          ","
          Prefix { $0 != "," }
          ","
          Bool.parser()
        }
      }
    }
  • Added: A new Backtrack parser (#287). Useful for adding explicit backtracking to a parser.

  • Changed: The CaseIterableRawRepresentable parser printer has been extended to work with any FixedWidthInteger (thanks @ytyubox, #277).

New Contributors

Full Changelog: 0.11.0...0.12.0

0.11.0

08 Dec 20:10
Compare
Choose a tag to compare

What's Changed

  • Swift 5.7 Updates (#261)
    • Changed: Parsing's builder limitations have been greatly improved. OneOfBuilder now takes an unlimited number of parsers, and ParserBuilder now takes an unlimited number of Void parsers, and up to 10 non-Void parsers.
    • Changed: Swift 5.7 Improvement: The Parser, ParserPrinter, Conversion, and PrependableCollection protocols now have primary associated types.
    • Added: Formatted parser-printer, for incrementally parsing and printing using Apple's family of formatters.
  • Changed: The End parser's conditional conformance requiring Collection has been broadened to work with any Sequence (thanks @JaapWijnen, #250).
  • Fixed: The Prefix parser-printer could erroneously fail to print when max was configured. This has been fixed (thanks @oskarek, #256).
  • Removed: The experimental _URLRouting module has been removed. Please upgrade to the official package, instead.
  • Infrastructure: Typo fixes (thanks @kamcma, #253; @elfenlaid, #257, #258).

New Contributors

Full Changelog: 0.10.0...0.11.0

0.10.0

28 Jun 22:30
bc92e84
Compare
Choose a tag to compare
  • Added: StartsWith, PrefixThrough, and PrefixUpTo overloads to aid in type inference for substring and UTF-8 parsers (thanks @tgrapperon).
  • Changed: Parsing now has Apple platform requirements equivalent to SwiftUI (iOS 13+, macOS 10.15+, tvOS 13+, watchOS 6+). If these minimum requirements don't fit your needs, let us know.
  • Fixed: PipeEnd now conforms to ParserPrinter, fixing printability of piped parsers (thanks @JaapWijnen).
  • Deprecated: the _URLRouting module is now deprecated. Use the URL Routing package instead.
  • Removed: Conversions.Parsing, which was not reachable through any static member on Conversion, and confused some users. If you have a use case motivating this conversion, let us know.

0.9.2

26 Apr 16:37
28d32e9
Compare
Choose a tag to compare
  • Fixed: Added a missing ParserPrinter conformance to OptionalOneOf, which prevented parsers that used if statements in @OneOfBuilder blocks from being printers.

The following changes have been made to the more experimental _URLRouting module:

  • Added: A Body() initializer that takes no arguments. It simply parses the entire body as Data.
  • Infrastructure: documentation changes.

0.9.1

20 Apr 22:57
Compare
Choose a tag to compare
  • Fixed: A Double.parser() overflow bug has been fixed (thanks @tgrapperon).

The following changes have been made to the more experimental _URLRouting module:

  • Added: A URLRoutingClient for wrapping a router and URL session into an HTTP client.
  • Fixed: A few potential bugs around Field and Body being empty.

0.9.0

11 Apr 05:38
edb72e8
Compare
Choose a tag to compare

Introduced the ParserPrinter protocol for invertible parsing.