View Source Minipeg.Cache (Minipeg v0.7.1)

Wrapping a map

Summary

Types

ast_list_t()

@type ast_list_t() :: [ast_t()]

ast_t()

@type ast_t() :: any()

atoms()

@type atoms() :: [atom()]

binaries()

@type binaries() :: [binary()]

binary?()

@type binary?() :: maybe(binary())

char_set_spec_t()

@type char_set_spec_t() :: maybe(binary() | list())

char_set_t()

@type char_set_t() :: [binary()] | binary()

either(success_t, error_t)

@type either(success_t, error_t) :: {:ok, success_t} | {:error, error_t}

entry_t()

@type entry_t() :: %{required(binary()) => storage_t()}

input_t()

@type input_t() :: binary() | [binary()] | Minipeg.Input.t()

maybe(t)

@type maybe(t) :: nil | t

name_t()

@type name_t() :: atom() | binary()

name_t?()

@type name_t?() :: maybe(name_t())

parser_function_t()

@type parser_function_t() :: (Minipeg.Input.t(), t(), binary() -> result_t())

position_t()

@type position_t() :: {pos_integer(), pos_integer()}

result_t()

@type result_t() :: Minipeg.Failure.t() | Minipeg.Ignore.t() | Minipeg.Success.t()

satisfier_result_t()

@type satisfier_result_t() :: either(any(), binary())

satisfier_t()

@type satisfier_t() :: (any() -> satisfier_result_t())

storage_t()

@type storage_t() ::
  {:success, ast_t(), Minipeg.Input.t(), position_t()}
  | {:failure, binary(), Minipeg.Input.t()}

str_or_count_t()

@type str_or_count_t() :: binary() | non_neg_integer()

t()

@type t() :: %Minipeg.Cache{
  cache: %{required(Minipeg.Input.position_t()) => entry_t()}
}

token1_comp_t()

@type token1_comp_t() ::
  {atom(), token_parse_part2()}
  | {atom(), token_parse_part2(), (binary() -> any())}

token1_spec_t()

@type token1_spec_t() ::
  {atom(), token_parse_part1()}
  | {atom(), token_parse_part1(), (binary() -> any())}

token_comp_t()

@type token_comp_t() :: [token1_comp_t()]

token_spec_t()

@type token_spec_t() :: [token1_spec_t()]

Functions

empty()

@spec empty() :: t()

lookup(wrapper, input, name)

@spec lookup(t(), Minipeg.Input.t(), binary()) :: maybe(result_t())

new(position, name, result)

@spec new(Minipeg.Input.position_t(), binary(), result_t()) :: t()

update(wrapper, position, name, result)

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