View Source Matcha.Rewrite (Matcha v0.1.10)
About rewrites.
Link to this section Summary
Link to this section Types
@type ast() :: Macro.t()
@type t() :: %Matcha.Rewrite{ bindings: %{ vars: %{required(var_ref()) => var_binding()}, count: non_neg_integer() }, context: Matcha.Context.t() | nil, env: Macro.Env.t(), source: Macro.t() }
@type var_ref() :: atom()
Link to this section Functions
@spec binding(t(), var_ref()) :: var_binding()
@spec pattern_to_spec(Matcha.Context.t(), Matcha.Pattern.t()) :: {:ok, Matcha.Spec.t()} | {:error, Matcha.Error.problems()}
@spec problem({type, description}) :: Matcha.Error.problem() when type: :error | :warning, description: charlist() | binary()
@spec problems(problems) :: Matcha.Error.problems() when problems: [{type, description}], type: :error | :warning, description: charlist() | binary()
@spec source(t()) :: Matcha.Source.uncompiled()
@spec spec_to_pattern(Matcha.Spec.t()) :: {:ok, Matcha.Pattern.t()} | {:error, Matcha.Error.problems()}
@spec spec_to_pattern!(Matcha.Spec.t()) :: Matcha.Pattern.t() | no_return()