Registry / utility / codemap

codemap

JSON →
library0.1.3rscratesunverified

A data structure for storing source code positions and mapping them to file/line/column locations.

# Cargo.toml [dependencies] codemap = "0.1.3"
INSTALL
IMPORT
SIG · CODEMAP
C
codemap
utilityrustv0.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CodeMap
use codemap::CodeMap;

Creates a CodeMap, adds a file, and looks up a span's location.

use codemap::CodeMap; fn main() { let mut codemap = CodeMap::new(); let file = codemap.add_file("test.rs", "fn main() {}".to_string()); let span = file.span(0, 12); let loc = codemap.look_up_span(span); println!("Location: {}:{}:{}", loc.file.name(), loc.begin.line, loc.begin.column); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
codemap — cargo add codemap · libregistry