data Span
A source range: file path, 1-based line and column of the start, byte offset and length.
Example:
use std.comptime { Decl, warn }
comptime fn todo_names(d: Decl) {
if d.name.startsWith("todo") {
warn(d.span, "{d.name} at line {d.span.line} of {d.span.file}")
}
}pub(api) data SpanSince. 1.0.0-beta
Fields
pub(api) file: str | Path of the source file. |
pub(api) line: u32 | 1-based line of the start. |
pub(api) col: u32 | 1-based column of the start. |
pub(api) offset: u32 | Byte offset of the start in the file. |
pub(api) length: u32 | Length in bytes. |
Defined in: std/comptime/comptime.oxl:37