Expand description
This library provides essentials types and trait to locate syntax elements.
Spandescribes a byte range in a source file, with an intuitive API to write lexers and parsers.Location<F>combines aSpanwith a file identifierFto pin point a syntactic element in a source file.Loc<T, F>wraps any valueTand bind it to its location.
Extra traits are also provided to extend common types (Option, Result, etc.) with localization functions.
The crate integrates well with diagnostic reporting libraries such as
codespan-reporting to render beautiful error reports.
Structs
Traits
Provides the at function to locate any value.
Locates the error of a Result<T, E>.
Maps the located error of a Result<T, Loc<E, F>>.
Type that can be stripped of its location information.
Provides a transposition function from Option<Loc<T, F>> to Loc<Option<T>, F>.