Lexer

Constructors

this
this(d_string sourcename, d_string base, int useStringtable)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

allocToken
Token* allocToken()
Undocumented in source. Be warned that the author may not have intended to support it.
error
void error(int msgnum, ARGS args)
Undocumented in source. Be warned that the author may not have intended to support it.
error
void error(.string fmt, ARGS args)
Undocumented in source. Be warned that the author may not have intended to support it.
escapeSequence
dchar escapeSequence()

Parse escape sequence.

get
dchar get(immutable(tchar)* p)
Undocumented in source. Be warned that the author may not have intended to support it.
inc
immutable(tchar)* inc(immutable(tchar)* p)
Undocumented in source. Be warned that the author may not have intended to support it.
insertSemicolon
void insertSemicolon(immutable(tchar)* loc)
Undocumented in source. Be warned that the author may not have intended to support it.
nextToken
TOK nextToken()
Undocumented in source. Be warned that the author may not have intended to support it.
number
TOK number(Token* t)

Read a number.

peek
Token* peek(Token* ct)
Undocumented in source. Be warned that the author may not have intended to support it.
regexp
d_string regexp()

Scan regular expression. Return null with buffer pointer intact if it is not a regexp.

rescan
void rescan()

Horrible kludge to support disambiguating TOKregexp from TOKdivide. The idea is, if we are looking for a TOKdivide, and find instead a TOKregexp, we back up and rescan.

scan
void scan(Token* t)

Turn next token in buffer into a token.

string
d_string string(tchar quote)
unicode
dchar unicode()

Static functions

isKeyword
TOK isKeyword(const(tchar)[] s)
Undocumented in source. Be warned that the author may not have intended to support it.
locToSrcline
d_string locToSrcline(immutable(char)* src, Loc loc)

Given source text, convert loc to a string for the corresponding line.

Static variables

inited
bool inited;
Undocumented in source.

Variables

base
d_string base;
Undocumented in source.
currentline
uint currentline;
Undocumented in source.
end
immutable(char)* end;
Undocumented in source.
errinfo
ErrInfo errinfo;
Undocumented in source.
freelist
Token* freelist;
Undocumented in source.
p
immutable(char)* p;
Undocumented in source.
sourcename
d_string sourcename;
Undocumented in source.
stringbuffer
OutBuffer stringbuffer;
Undocumented in source.
stringtable
Identifier[d_string] stringtable;
Undocumented in source.
token
Token token;
Undocumented in source.
useStringtable
int useStringtable;
Undocumented in source.

Meta