View Source Minipeg.Parser (Minipeg v0.2.1)
A struct containung a parser function and a name
Summary
Types
@type ast_t() :: any()
@type binaries() :: [binary()]
@type either(success_t, error_t) :: {:ok, success_t} | {:error, error_t}
@type input_t() :: binary() | [binary()] | Minipeg.Input.t()
@type maybe(t) :: nil | t
@type parser_function_t() :: (Minipeg.Input.t(), Minipeg.Cache.t(), binary() -> result_t())
@type result_t() :: Minipeg.Failure.t() | Minipeg.Success.t()
@type satisfier_t() :: (any() -> satisfier_result_t())
@type str_or_count_t() :: binary() | non_neg_integer()
@type t() :: %Minipeg.Parser{name: binary(), parser_function: parser_function_t()}
Functions
@spec new(binary(), parser_function_t()) :: t()
@spec parse(t(), Minipeg.Input.t(), Minipeg.Cache.t()) :: result_t()
@spec parse_string(t(), binary()) :: result_tuple_t()