Ergo.Combinators.atom

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

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

Examples

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