Lexer

Constructors

this
this(const(char)* filename, const(char)* base, size_t begoffset, size_t endoffset, bool doDocComment, bool commentToken, DiagnosticHandler handleDiagnostic)

Creates a Lexer for the source code base[begoffset..endoffset+1]. The last character, baseendoffset, must be null (0) or EOF (0x1A).

Members

Functions

allocateToken
Token* allocateToken()
deprecation
void deprecation(const(char)* format, ...)
Undocumented in source. Be warned that the author may not have intended to support it.
deprecationSupplemental
void deprecationSupplemental(const(char)* format, ...)
Undocumented in source. Be warned that the author may not have intended to support it.
error
void error(const(char)* format, ...)
Undocumented in source. Be warned that the author may not have intended to support it.
error
void error(Loc loc, const(char)* format, ...)
Undocumented in source. Be warned that the author may not have intended to support it.
errorSupplemental
void errorSupplemental(Loc loc, const(char)* format, ...)
Undocumented in source. Be warned that the author may not have intended to support it.
loc
Loc 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.
peek
Token* peek(Token* ct)
Undocumented in source. Be warned that the author may not have intended to support it.
peekNext
TOK peekNext()

Look ahead at next token's value.

peekNext2
TOK peekNext2()

Look 2 tokens ahead at value.

peekPastParen
Token* peekPastParen(Token* tk)

tk is on the opening (. Look ahead and return token that is past the closing ).

scan
void scan(Token* t)

Turn next token in buffer into a token.

warning
void warning(Loc loc, const(char)* format, ...)
Undocumented in source. Be warned that the author may not have intended to support it.
warningSupplemental
void warningSupplemental(Loc loc, const(char)* format, ...)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

combineComments
const(char)* combineComments(const(char)[] c1, const(char)[] c2, bool newParagraph)

Combine two document comments into one, separated by an extra newline if newParagraph is true.

Variables

p
const(char)* p;
Undocumented in source.
prevloc
Loc prevloc;
Undocumented in source.
scanloc
Loc scanloc;
Undocumented in source.
token
Token token;
Undocumented in source.

Meta