Loc

A source code location

Used for error messages, __FILE__ and __LINE__ tokens, __traits(getLocation, XXX), debug info etc.

Members

Functions

equals
bool equals(const(Loc) loc)

Checks for equivalence by comparing the filename contents (not the pointer) and character location.

isValid
bool isValid()
opEquals
bool opEquals(const(Loc) loc)
toHash
size_t toHash()

opEquals() / toHash() for AA key usage

Static functions

set
void set(bool showColumns, MessageStyle messageStyle)

Configure how display is done

Static variables

initial
Loc initial;

use for default initialization of const ref Loc's

Variables

charnum
uint charnum;

utf8 code unit index relative to start of line, starting from 1

fileOffset
uint fileOffset;

utf8 code unit index relative to start of file, starting from 0

filename
const(char)* filename;

zero-terminated filename string, either absolute or relative to cwd

linnum
uint linnum;

line number, starting from 1

Meta