Skip to main content

Module span

Module span 

Source
Expand description

Utilities for working with source locations and spans.

Structs§

SourceLocation
Represents a location in source code using one-based line and column numbers.
SourceSpan
Represents a span of source code.

Enums§

SpanError
Errors produced when constructing spans.

Functions§

span_line_count
Calculates the number of lines covered by the span (inclusive).
span_to_lines
Converts a span into the inclusive range of line numbers it covers.