Rust: add canonical_path and crate_origin to Item

This commit is contained in:
Paolo Tranquilli
2024-10-22 15:12:47 +02:00
parent 7338eafbd4
commit 194e0daa8c
82 changed files with 852 additions and 144 deletions

View File

@@ -34,6 +34,10 @@ fn extract(
let line_index = LineIndex::new(text.as_ref());
let display_path = file.to_string_lossy();
let mut trap = traps.create("source", file);
trap.writer.comment(format!(
"semantics: {}",
if semantics.is_some() { "yes" } else { "no" }
));
let label = trap.emit_file(file);
let mut translator = translate::Translator::new(
trap,