Ergo.Parser.diagnose

You're seeing just the function diagnose, go back to Ergo.Parser module for more information.
Link to this function

diagnose(parser, ctx)

diagnose/2 invokes the specified parser by calling its parsing function with the specific context while tracking the progress of the parser. The progress can be retrieved from the progress key of the returned context.

Examples

iex> alias Ergo.{Context, Parser}
iex> import Ergo.{Combinators, Terminals}
iex> context = Context.new(&Ergo.Parser.diagnose/2, "Hello World")
iex> parser = many(wc())
iex> assert %{rules: []} = Parser.invoke(parser, context)