Source map
Utilities for building source maps (v3) for a compiler and handling source location representations
Includes
Span
, a structure which represents a section of a specific sourceSourceId
, a identifier for a source fileStringWithSourceMap
, along with theToString
trait makes generating string representations with and adding source markings trivial- With the
lsp-types-morphisms
features makes converting between the position information in lsp-types easy
Example
git clone https://github.com/kaleidawave/source-map
cd source-map
cargo run -F inline-source-map --example source_map_creation -- LICENSE LICENSE.map
View pairings generated by uploading LICENSE.map
to evan w's source map visualizer