View Source Minipeg.Failure (Minipeg v0.6.5)

A failure result

Summary

Types

@type ast_list_t() :: [ast_t()]
@type ast_t() :: any()
@type atoms() :: [atom()]
@type binaries() :: [binary()]
@type binary?() :: maybe(binary())
@type char_set_spec_t() :: maybe(binary() | list())
@type char_set_t() :: [binary()] | binary()
Link to this type

either(success_t, error_t)

View Source
@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 name_t() :: atom() | binary()
@type name_t?() :: maybe(name_t())
@type parser_function_t() :: (Minipeg.Input.t(), Minipeg.Cache.t(), binary() ->
                          result_t())
@type position_t() :: {pos_integer(), pos_integer()}
@type result_t() :: t() | Minipeg.Ignore.t() | Minipeg.Success.t()
@type satisfier_result_t() :: either(any(), binary())
@type satisfier_t() :: (any() -> satisfier_result_t())
@type str_or_count_t() :: binary() | non_neg_integer()
@type t() :: %Minipeg.Failure{
  cache: Minipeg.Cache.t(),
  input: Minipeg.Input.t(),
  parsed_by: binary(),
  reason: binary()
}
@type token1_comp_t() ::
  {atom(), token_parse_part2()}
  | {atom(), token_parse_part2(), (binary() -> any())}
@type token1_spec_t() ::
  {atom(), token_parse_part1()}
  | {atom(), token_parse_part1(), (binary() -> any())}
@type token_comp_t() :: [token1_comp_t()]
@type token_spec_t() :: [token1_spec_t()]

Functions

@spec error_message(t()) :: binary()
Link to this function

fail(reason, input, cache, parsed_by \\ "")

View Source
@spec fail(binary(), Minipeg.Input.t(), Minipeg.Cache.t(), binary()) :: t()
@spec format(t()) :: binary()
Link to this function

reset_error(f, reason, parser_name \\ nil)

View Source
@spec reset_error(t(), binary?(), binary?()) :: t()