Skip to content
New issue

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

manyTill_ combinator #108

Closed
jamesdbrock opened this issue Feb 1, 2021 · 3 comments
Closed

manyTill_ combinator #108

jamesdbrock opened this issue Feb 1, 2021 · 3 comments

Comments

@jamesdbrock
Copy link
Member

We should have the super-useful manyTill_ combinator.

Combinators.manyTill_

manyTill_ :: forall e m a s. Monad m => ParserT s m a -> ParserT s m e -> ParserT s m (Tuple (List a) e)

Also

someTill_ :: forall e m a s. Monad m => ParserT s m a -> ParserT s m e -> ParserT s m (Tuple (List a) e)
@jamesdbrock
Copy link
Member Author

I've written a draft implementation of manyTill_ and many1Till_ and I'll submit a PR if you like.

https://github.com/jamesdbrock/purescript-parsing-string-replace/blob/be8c27680bccd1a8f54c5c98d72747a1cc0e4a84/src/Text.Parsing.Parser.String.Replace.purs#L45

@jamesdbrock
Copy link
Member Author

I've published this in another package. Thinking about merging that package into this one. https://pursuit.purescript.org/packages/purescript-parsing-replace/docs/Text.Parsing.Replace.String.Combinator#v:manyTill_

@jamesdbrock
Copy link
Member Author

Resolved by #143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant