Struct symbolic_sourcemap::SourceMapView
[−]
[src]
pub struct SourceMapView { /* fields omitted */ }
Represents a sourcemap.
Methods
impl SourceMapView
[src]
fn from_json_slice(buffer: &[u8]) -> Result<SourceMapView>
[src]
Constructs a sourcemap from a slice.
If the sourcemap is an index it is being flattened. If flattening is not possible then an error is raised.
fn lookup_token<'a>(&'a self, line: u32, col: u32) -> Option<TokenMatch<'a>>
[src]
Looks up a token and returns it.
fn get_token<'a>(&'a self, idx: u32) -> Option<TokenMatch<'a>>
[src]
Returns a token for a specific index.
fn get_token_count(&self) -> u32
[src]
Returns the number of tokens.
fn get_source_view<'a>(&'a self, idx: u32) -> Option<&'a SourceView<'a>>
[src]
Returns a source view for the given source.
fn get_source_name(&self, idx: u32) -> Option<&str>
[src]
Returns the source name for an index.
fn get_source_count(&self) -> u32
[src]
Returns the number of sources.
fn lookup_token_with_function_name<'a, 'b>(
&'a self,
line: u32,
col: u32,
minified_name: &str,
source: &SourceView<'b>
) -> Option<TokenMatch<'a>>
[src]
&'a self,
line: u32,
col: u32,
minified_name: &str,
source: &SourceView<'b>
) -> Option<TokenMatch<'a>>
Looks up a token and the original function name.
This is similar to lookup_token
but if a minified function name and
the sourceview to the minified source is available this function will
also resolve the original function name. This is used to fully
resolve tracebacks.