Ergo.Combinators.string

You're seeing just the function string, go back to Ergo.Combinators module for more information.

The string/1 parser takes a parser that returns an AST which is a list of characters and converts the AST into a string.

Examples

iex> alias Ergo
iex> alias Ergo.Context
iex> import Ergo.{Terminals, Combinators}
iex> parser = many(alpha()) |> string()
iex> assert %Context{status: :ok, ast: "FourtyTwo"} = Ergo.parse(parser, "FourtyTwo")