Utilities for building source maps (v3), handling source location representations and source files.
SpanWithSource, a structure which represents a section of a specific sourceSpanWithoutSource, a structure which represents a general section without a specific sourceSourceId, a identifier for a source fileStringWithOptionalSourceMap, along with theToStringtrait makes generating string representations with and adding source markings trivial- A
lsp-types-morphismsfeature which allows conversion of position type to lsp-types - The
MapFileStorestruct and theFileSystemtrait for storing source files and other information - Utilities for turning byte indices into line and column information
See generated example on GitHub actions.
git clone https://github.com/kaleidawave/source-map
cd source-map
cargo run -F inline-source-map --example source_map_creation -- LICENSE LICENSE.mapView pairings generated by uploading LICENSE.map to evan w's source map visualizer