Skip to main content

Crate haskelujah_span

Crate haskelujah_span 

Source
Expand description

§haskelujah-span-chirho

Foundation crate for source location tracking in the Haskelujah compiler. Provides file identifiers, byte offsets, and spans that all other crates use for diagnostics, error reporting, and source mapping.

Zero external dependencies by design — this crate is the root of the dependency graph and must compile fast.

Structs§

ByteOffsetChirho
An absolute byte offset from the start of a source file.
FileIdChirho
A lightweight, copyable identifier for a source file.
LineColChirho
A human-readable line and column number (both 1-based).
LineIndexChirho
A precomputed index of newline positions in a source file, enabling efficient byte-offset → line/column conversion for diagnostics.
SourceMapChirho
Registry that assigns FileIdChirho values and stores file names and contents. All source files loaded by the compiler are registered here so that any span can be resolved back to file name + line/column.
SpanChirho
A contiguous range of bytes [start, end) within a source file, identified by a FileIdChirho.
SpannedChirho
A value paired with the source span where it was found.