Releases: pointfreeco/swift-parsing
0.14.1
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
What's Changed
- Added: Parser builders now support more than 10 non-
Void
parsers (thanks @coenttb, #367). - Fixed: Don't use
input.count
inPrefixThrough
andPrefixUpTo
for performance improvement (thanks @BjornRuud, #354). - Infrastructure: Documentation and playground fixes (thanks @DivineDominion, #322; thanks @pinkjuice66, #334; thanks @macwilko; #350; thanks @RoBo-Inc, #353, #356).
- Infrastructure: Added
.editorconfig
for consistent code formatting (thanks @Matejkob, #348). - Infrastructure: CI updates (#355; #368).
New Contributors
- @DivineDominion made their first contribution in #322
- @pinkjuice66 made their first contribution in #334
- @Matejkob made their first contribution in #348
- @macwilko made their first contribution in #350
- @RoBo-Inc made their first contribution in #353
- @BjornRuud made their first contribution in #354
- @coenttb made their first contribution in #367
Full Changelog: 0.13.0...0.14.0
0.13.0
0.12.1
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
- @jacoblapworth made their first contribution in #295
Full Changelog: 0.12.0...0.12.1
0.12.0
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
andOneOfBuilder
.
-
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 anyFixedWidthInteger
(thanks @ytyubox, #277).
New Contributors
Full Changelog: 0.11.0...0.12.0
0.11.0
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, andParserBuilder
now takes an unlimited number ofVoid
parsers, and up to 10 non-Void
parsers. - Changed: Swift 5.7 Improvement: The
Parser
,ParserPrinter
,Conversion
, andPrependableCollection
protocols now have primary associated types. - Added:
Formatted
parser-printer, for incrementally parsing and printing using Apple's family of formatters.
- Changed: Parsing's builder limitations have been greatly improved.
- Changed: The
End
parser's conditional conformance requiringCollection
has been broadened to work with anySequence
(thanks @JaapWijnen, #250). - Fixed: The
Prefix
parser-printer could erroneously fail to print whenmax
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
- @kamcma made their first contribution in #253
- @elfenlaid made their first contribution in #257
Full Changelog: 0.10.0...0.11.0
0.10.0
- Added:
StartsWith
,PrefixThrough
, andPrefixUpTo
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 toParserPrinter
, 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 onConversion
, and confused some users. If you have a use case motivating this conversion, let us know.
0.9.2
- Fixed: Added a missing
ParserPrinter
conformance toOptionalOneOf
, which prevented parsers that usedif
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 asData
. - Infrastructure: documentation changes.
0.9.1
- 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
andBody
being empty.