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

clean up 'recursive' parser description #523

Merged
merged 1 commit into from
Aug 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/shared/src/main/scala/cats/parse/Parser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1706,8 +1706,8 @@ object Parser {
def defer0[A](pa: => Parser0[A]): Parser0[A] =
Impl.Defer0(() => pa)

/** Build a recursive parser by assuming you have it Useful for parsing recurive structures, like
* for instance JSON.
/** Build a recursive parser by assuming you have it Useful for parsing recursive structures like
* JSON.
*/
def recursive[A](fn: Parser[A] => Parser[A]): Parser[A] = {
lazy val result: Parser[A] = fn(defer(result))
Expand Down