Location

Represents a location in a source text.

Constructors

this
this(cstring filePath, size_t lineNum)

Forwards the parameters to the second constructor.

this
this(cstring filePath, size_t lineNum, cchar* lineBegin, cchar* to)

Constructs a Location object.

Members

Functions

calculateColumn
uint calculateColumn(uint tabWidth = Location.TAB_WIDTH)

Uses a simple method to count the number of characters in a string.

Static variables

TAB_WIDTH
uint TAB_WIDTH;

The default width of the tabulator character.

Variables

filePath
cstring filePath;

The file path.

lineNum
size_t lineNum;

The line number.

to
cchar* to;

Used to calculate the column.

Meta