SourceFileInfo

One struct per source file File can be virtual or located in some File System Stored in CompilationContext.files

Members

Variables

content
const(char)[] content;

If set, then used as a source. Otherwise is read from file name

firstTokenIndex
TokenIndex firstTokenIndex;

Tokens of all files are stored linearly inside CompilationContext.tokenBuffer and CompilationContext.tokenLocationBuffer. Token file can be found with binary search

length
uint length;

Length of source code

mod
ModuleDeclNode* mod;

Module declaration

name
string name;

File name. Must be always set.

start
uint start;

Start of file source code in CompilationContext.sourceBuffer

Meta