Trait swc_common::source_map::SourceMapGenConfig
source · [−]pub trait SourceMapGenConfig {
fn file_name_to_source(&self, f: &FileName) -> String;
fn name_for_bytepos(&self, _bpos: BytePos) -> Option<&str> { ... }
fn inline_sources_content(&self, f: &FileName) -> bool { ... }
fn emit_columns(&self, _f: &FileName) -> bool { ... }
fn skip(&self, _f: &FileName) -> bool { ... }
}
Required Methods
sourcefn file_name_to_source(&self, f: &FileName) -> String
fn file_name_to_source(&self, f: &FileName) -> String
Provided Methods
sourcefn name_for_bytepos(&self, _bpos: BytePos) -> Option<&str>
fn name_for_bytepos(&self, _bpos: BytePos) -> Option<&str>
sourcefn inline_sources_content(&self, f: &FileName) -> bool
fn inline_sources_content(&self, f: &FileName) -> bool
You can override this to control sourceContents
.
sourcefn emit_columns(&self, _f: &FileName) -> bool
fn emit_columns(&self, _f: &FileName) -> bool
You can define whether to emit sourcemap with columns or not