Ichor.Node (Ichor v0.1.1)

Copy Markdown View Source

The default-fallback shape Ichor.Actions builds for a matched rule that has more than one meaningful capture (a rule with exactly one capture passes that capture's own value straight through instead): rule names the matched rule, captures maps each capture name to its already-evaluated value (or a list of values, for a name captured more than once -- e.g. inside a *), and span locates the whole match back in the original input.

Summary

Types

t()

@type t() :: %Ichor.Node{
  captures: %{optional(atom()) => term() | [term()]},
  rule: atom(),
  span: Grammar.IR.Meta.source_span() | nil
}