View Source Minipeg.Input (Minipeg v0.1.7)

An input wrapper

Link to this section Summary

Link to this section Types

@type ast_t() :: any()
@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 input_t() :: binary() | [binary()] | t()
@type maybe(t) :: nil | t
@type parser_function_t() :: (t(), Minipeg.Cache.t(), binary() -> result_t())
@type position_t() :: {pos_integer(), pos_integer()}
@type result_t() :: Minipeg.Failure.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.Input{chars: [binary()], col: pos_integer(), lnb: pos_integer()}
@type take_and_rest_t() :: {binary(), t()}

Link to this section Functions

Link to this function

drop(inp, str_or_count \\ 1)

View Source
@spec drop(t(), str_or_count_t()) :: t()
Link to this function

new(source, col \\ 1, lnb \\ 1)

View Source
@spec new(input_t(), pos_integer(), pos_integer()) :: t()
@spec position(t()) :: position_t()
Link to this function

take(input, str_or_count)

View Source
@spec take(t(), str_or_count_t()) :: take_and_rest_t()