Skip to content

0.12.0

Compare
Choose a tag to compare
@stephencelis stephencelis released this 31 Mar 15:54
· 23 commits to main since this release
c6e2241

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