SourceFile

Type Alias SourceFile 

Source
pub type SourceFile = SourceFile;

Aliased Type§

pub struct SourceFile {
    pub name: FileName,
    pub src: Option<Rc<String>>,
    pub src_hash: SourceFileHash,
    pub start_pos: BytePos,
    pub end_pos: BytePos,
    pub lines: Vec<BytePos>,
    pub multibyte_chars: Vec<MultiByteChar>,
    pub non_narrow_chars: Vec<NonNarrowChar>,
    pub normalized_pos: Vec<NormalizedPos>,
    pub name_hash: u64,
}

Fields§

§name: FileName

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: Option<Rc<String>>

The complete source code.

§src_hash: SourceFileHash

The source code’s hash.

§start_pos: BytePos

The start position of this source in the SourceMap.

§end_pos: BytePos

The end position of this source in the SourceMap.

§lines: Vec<BytePos>

Locations of lines beginnings in the source code.

§multibyte_chars: Vec<MultiByteChar>

Locations of multi-byte characters in the source code.

§non_narrow_chars: Vec<NonNarrowChar>

Width of characters that are not narrow in the source code.

§normalized_pos: Vec<NormalizedPos>

Locations of characters removed during normalization.

§name_hash: u64

A hash of the filename, used for speeding up hashing in incremental compilation.