Parser

Constructors

this
this(const ref Loc loc, AST.Module _module, const(char)[] input, bool doDocComment)

Use this constructor for string mixins. Input: loc location in source file of mixin

Members

Functions

parsePrimaryExp
AST.Expression parsePrimaryExp()

Expression Parser

parseStatement
AST.Statement parseStatement(int flags, const(char)** endPtr = null, Loc* pEndloc = null)

Input: flags PSxxxx Output: pEndloc if { ... statements ... }, store location of closing brace, otherwise loc of last token of statement

parseTypeOrAssignExp
RootObject parseTypeOrAssignExp(TOK endtoken = TOK.reserved)

Parse a Type or an Expression

Static functions

isBuiltinAtAttribute
StorageClass isBuiltinAtAttribute(Identifier ident)

Recognize builtin @ attributes

Inherited Members

From Lexer

allocateToken
Token* allocateToken()
peekNext
TOK peekNext()

Look ahead at next token's value.

peekNext2
TOK peekNext2()

Look 2 tokens ahead at value.

scan
void scan(Token* t)

Turn next token in buffer into a token.

peekPastParen
Token* peekPastParen(Token* tk)

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

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.

Meta