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.
- Line
Index - 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.