Parser

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

parseFunction
TopStatement parseFunction(int flag)

flag: * 0 Function statement * 1 Function literal

parseParenExp
Expression parseParenExp()

Expression Parser

parseProgram
int parseProgram(out TopStatement[] topstatements, ErrInfo* perrinfo)

Return !=0 on error, and fill in *perrinfo.

parseStatement
Statement parseStatement()

Static functions

parseFunctionDefinition
int parseFunctionDefinition(out FunctionDefinition pfd, immutable(char)[] params, immutable(char)[] bdy, out ErrInfo perrinfo)

Return !=0 on error, and fill in *perrinfo.

Inherited Members

From Lexer

locToSrcline
d_string locToSrcline(immutable(char)* src, Loc loc)

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

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.

escapeSequence
dchar escapeSequence()

Parse escape sequence.

string
d_string string(tchar quote)
regexp
d_string regexp()

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

unicode
dchar unicode()
number
TOK number(Token* t)

Read a number.

Meta