swift-parsing
swift-parsing copied to clipboard
A library for turning nebulous data into well-structured data, with a focus on composition, performance, generality, and ergonomics.
I am currently trying to integrate one of my libraries(https://github.com/alexanderwe/ConventionalCommitsKit), which uses `swift-parsing` into one a CLI for macOS `10.15`. As soon as I integrate my library into the CLI...
Hello! This PR adds two overloads for the nil-coalescing operator to sugar `.replaceError(with:)`. It should improve reachability of `ReplaceError` parsers that are very frequently needed. If the left/upstream parser fails,...
I think result builder syntax for printer-parsers should roughly correspond with combinators `branch` and `factor` with signatures like: ``` func factor (A -> (A0, A1), (A0, A1) -> A) (Parser)...
commented on a couple of places where I ran into useful commentary that would like to be hoisted into the documentation but thought I'd put together a ticket to make...
When using `OneOf` there is failure to differentiate between an Int and Double. Examples: ```swift let parser = OneOf { Double.parser(of: Substring.self).map(.case(Value.float)) Int.parser().map(.case(Value.int)) } let input = "1.0" let argument...
This is a pitch for adding one or possibly both parsers to the core library. There is nothing in the library that currently lets you do what these do. They...
When using a `CharacterSet` inside a parser, any character that is not in the set will crash the process. Version: ``` { "identity" : "swift-parsing", "kind" : "remoteSourceControl", "location" :...
## The Problem StartsWith parser don't produce an error message as documented when failed. Above code produce a below error message which has a wired type presented at expected value...
Current example is bit misleading as it results on non compiling code. With this change, we also showcase usage of preexisting Conversion.
I have encountered a crash when using `replaceError(with:)`, and can reproduce it using the example documented in the `OneOf` parser. ```swift enum Currency { case eur, gbp, usd, unknown }...