Grammar.IR.Meta (Ichor v0.2.1)

Copy Markdown View Source

Source-location metadata carried by every Grammar.IR node, so an error raised at any later stage (analysis, either backend) can still point back at the exact line/column in the original grammar file rather than just naming an IR node in the abstract.

Summary

Types

1-based line, 1-based column, match length in the original source.

t()

Types

source_span()

@type source_span() ::
  {line :: pos_integer(), column :: pos_integer(), length :: non_neg_integer()}

1-based line, 1-based column, match length in the original source.

t()

@type t() :: %Grammar.IR.Meta{
  source_format: atom() | nil,
  source_span: source_span() | nil
}