Struct syntax::codemap::FileMap[src]

pub struct FileMap {
    pub name: FileName,
    pub src: String,
    pub start_pos: BytePos,
    pub lines: RefCell<Vec<BytePos>>,
    pub multibyte_chars: RefCell<Vec<MultiByteChar>>,
}

A single source in the CodeMap

Fields

name

The name of the file that the source came from, source that doesn't originate from files has names between angle brackets by convention, e.g. <anon>

src

The complete source code

start_pos

The start position of this source in the CodeMap

lines

Locations of lines beginnings in the source code

multibyte_chars

Locations of multi-byte characters in the source code

Methods

impl FileMap

fn next_line(&self, pos: BytePos)

fn get_line(&self, line: int) -> String

fn record_multibyte_char(&self, pos: BytePos, bytes: uint)

fn is_real_file(&self) -> bool