File tree 2 files changed +452
-0
lines changed 2 files changed +452
-0
lines changed Original file line number Diff line number Diff line change @@ -290,9 +290,19 @@ consumeWith f = ParserT
290
290
-- | Will fail if no section of the input is parseable. To backtrack the input
291
291
-- | stream on failure, combine with `tryRethrow`.
292
292
-- |
293
+ -- | This combinator works like
294
+ -- | [Data.String.takeWhile](https://pursuit.purescript.org/packages/purescript-strings/docs/Data.String#v:takeWhile)
295
+ -- | or
296
+ -- | [Data.String.Regex.search](https://pursuit.purescript.org/packages/purescript-strings/docs/Data.String.Regex#v:search)
297
+ -- | and it allows using a parser for the pattern search.
298
+ -- |
293
299
-- | This combinator is equivalent to `manyTill_ anyCodePoint`, but it will be
294
300
-- | faster because it returns a slice of the input `String` for the
295
301
-- | section preceding the parse instead of a `List CodePoint`.
302
+ -- |
303
+ -- | Be careful not to look too far
304
+ -- | ahead; if the phrase parser looks to the end of the input then `anyTill`
305
+ -- | could be *O(n²)*.
296
306
anyTill
297
307
:: forall m a
298
308
. Monad m
You can’t perform that action at this time.
0 commit comments