Struct static_analyser::codemap::CodeMap
[−]
[src]
pub struct CodeMap { /* fields omitted */ }A mapping of Spans to the files in which they are located.
Methods
impl CodeMap[src]
fn new() -> CodeMap
Create a new, empty CodeMap.
fn insert_file<C, F>(&mut self, filename: F, contents: C) -> Rc<FileMap> where
F: Into<String>,
C: Into<String>,
F: Into<String>,
C: Into<String>,
Add a new file to the CodeMap and get back a reference to it.
fn lookup(&self, span: Span) -> &str
Get the substring that this Span corresponds to.
fn files(&self) -> &[Rc<FileMap>]
The files that this CodeMap contains.