Ergo.Parser.diagnose
You're seeing just the function
diagnose
, go back to Ergo.Parser module for more information.
Link to this function
diagnose(ctx)
diagnose/1
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/1, "Hello World")
iex> parser = many(wc())
iex> assert %{status: :ok} = Parser.invoke(parser, context)