Struct syntax::codemap::CodeMap[src]

pub struct CodeMap {
    pub files: RefCell<Vec<Rc<FileMap>>>,
}

Fields

files

Methods

impl CodeMap

fn new() -> CodeMap

fn new_filemap(&self, filename: FileName, src: String) -> Rc<FileMap>

fn mk_substr_filename(&self, sp: Span) -> String

fn lookup_char_pos(&self, pos: BytePos) -> Loc

Lookup source information about a BytePos

fn lookup_char_pos_adj(&self, pos: BytePos) -> LocWithOpt

fn span_to_str(&self, sp: Span) -> String

fn span_to_filename(&self, sp: Span) -> FileName

fn span_to_lines(&self, sp: Span) -> FileLines

fn span_to_snippet(&self, sp: Span) -> Option<String>

fn get_filemap(&self, filename: &str) -> Rc<FileMap>

fn lookup_byte_offset(&self, bpos: BytePos) -> FileMapAndBytePos

fn bytepos_to_file_charpos(&self, bpos: BytePos) -> CharPos