webql/compiler/source
Copy MarkdownTypes
Span
pub type Span {
Span(start: Int, end: Int)
}The total span of characters in a source.
Span(start: Int, end: Int)Values
cover
pub fn cover(a: Span, b: Span) -> Span Grabs the start of a and the end of b to cover the entire relative
span of characters.
slice
pub fn slice(source: String, span: Span) -> StringRelative to a span value slices the source.