neco_gleam/diagnostic
Types
pub type Failure {
InvalidSpan(start_byte: Int, end_byte: Int)
}
Constructors
-
InvalidSpan(start_byte: Int, end_byte: Int)
Values
pub fn span_create(
start_byte: Int,
end_byte: Int,
) -> Result(Span, Failure)
Creates [start_byte, end_byte), returning InvalidSpan for a negative
endpoint or a start greater than the end.
pub fn span_end_byte(span: Span) -> Int
pub fn span_start_byte(span: Span) -> Int