Crate gruel_span

Crate gruel_span 

Source
Expand description

Source span and location types for the Gruel compiler.

This crate provides the fundamental types for tracking source locations throughout the compilation pipeline.

Structs§

FileId
A file identifier used to track which source file a span belongs to.
LineIndex
Precomputed line offset index for efficient byte offset to line number conversion.
Span
A span representing a range in the source code.

Functions§

byte_offset_to_line
Convert a byte offset to a 1-based line number.
byte_offset_to_line_col
Convert a byte offset to 1-based line and column numbers.