Encode index of SourceFile along with span.

This commit is contained in:
Camille GILLOT 2022-08-06 22:33:06 +02:00
parent 55f46419af
commit f20ceb1c6f
5 changed files with 65 additions and 69 deletions

View file

@ -337,6 +337,7 @@ impl SourceMap {
mut file_local_normalized_pos: Vec<NormalizedPos>,
original_start_pos: BytePos,
original_end_pos: BytePos,
metadata_index: u32,
) -> Lrc<SourceFile> {
let start_pos = self
.allocate_address_space(source_len)
@ -383,6 +384,7 @@ impl SourceMap {
kind: ExternalSourceKind::AbsentOk,
original_start_pos,
original_end_pos,
metadata_index,
}),
start_pos,
end_pos,