We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think result builder syntax for printer-parsers should roughly correspond with combinators branch and factor with signatures like:
branch
factor
func factor<A,A0,A1> (A -> (A0, A1), (A0, A1) -> A) (Parser<A0>) (Parser<A1>) -> Parser<A> func branch<A,A0,A1> (A -> Either<A0, A1>, Either<A0, A1> -> A) (Parser<A0>) (Parser<A1>) -> Parser<A>
Apologies for my poor Swift. The first arguments of factor and branch can be packaged up as Conversions.
Conversion
The text was updated successfully, but these errors were encountered:
Using the identity Conversion you can define operators like:
func >*< <A,A0,A1> (left: Parser<A0>, right: Parser<A1>) -> Parser<(A0,A1)> func >|< <A,A0,A1> (left: Parser<A0>, right: Parser<A1>) -> Parser<Either<A0,A1>>
Sorry, something went wrong.
No branches or pull requests
I think result builder syntax for printer-parsers should roughly correspond with combinators
branch
andfactor
with signatures like:Apologies for my poor Swift. The first arguments of
factor
andbranch
can be packaged up asConversion
s.The text was updated successfully, but these errors were encountered: