View Source Minipeg.Cache (Minipeg v0.2.6)

Wrapping a map

Summary

Types

@type ast_list_t() :: [ast_t()]
@type ast_t() :: any()
@type binaries() :: [binary()]
@type binary?() :: maybe(binary())
@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 entry_t() :: %{required(binary()) => storage_t()}
@type input_t() :: binary() | [binary()] | Minipeg.Input.t()
@type maybe(t) :: nil | t
@type parser_function_t() :: (Minipeg.Input.t(), t(), binary() -> result_t())
@type result_t() :: Minipeg.Failure.t() | Minipeg.Success.t()
@type satisfier_result_t() :: either(any(), binary())
@type satisfier_t() :: (any() -> satisfier_result_t())
@type storage_t() ::
  {:success, ast_t(), Minipeg.Input.t()}
  | {:failure, binary(), Minipeg.Input.t()}
@type str_or_count_t() :: binary() | non_neg_integer()
@type t() :: %Minipeg.Cache{
  cache: %{required(Minipeg.Input.position_t()) => entry_t()}
}

Functions

@spec empty() :: t()
Link to this function

lookup(wrapper, input, name)

View Source
@spec lookup(t(), Minipeg.Input.t(), binary()) :: maybe(result_t())
Link to this function

new(position, name, result)

View Source
@spec new(Minipeg.Input.position_t(), binary(), result_t()) :: t()
Link to this function

update(wrapper, position, name, result)

View Source
@spec update(t(), Minipeg.Input.position_t(), binary(), result_t()) :: t()