Expand description
This library provides essentials types and trait to locate syntax elements.
Spandescribes a byte range in a source file. It is very similar toRange<usize>but is not an iterator and implementsCopy. It also provides an intuitive API to write lexers and parsers.Location<F>combines aSpanwith a file identifierFto pin point a syntactic element in a source file.
The crate integrates well with
codespan-reporting library
to render beautiful error reports. Enable the reporting feature to add
dedicated methods to convert a Location value into a
codespan_reporting::diagnostic::Label.
Structs§
Traits§
- Located
- Value with a location.
- Maybe
Located - Value with an optional location.
- Maybe
Spanned - Value with an optional span.
- Spanned
- Value with a span.