Skip to main content

Module span

Module span 

Source
Expand description

Source spans — byte ranges into a source file, for diagnostics and (later) runtime error provenance.

Value types only. A Span is never embedded in a Term variant, so Term’s PartialEq/identity is unaffected — spans annotate the AST from the outside (Spanned<T>), they don’t change what a term is.

Line/column is deliberately not stored here: it is a presentation concern resolved from the source text at format time (see plg_frontend’s SourceMap). Byte offsets are the stable representation.

Structs§

Span
A byte range [lo, hi) into a source file.
Spanned
A value annotated with its source span — carries spans alongside the AST without putting one inside Term itself.

Type Aliases§

FileId
Identifies a source file. Single-buffer today (always 0); multi-file mapping arrives with plgc build’s concatenated inputs.