Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.


Compiler implementation of the D programming language.

Source parse.d

immutable PREC[TOK.max_] precedence;
Set operator precedence for each operator.
Used by hdrgen
class Parser(AST): Lexer;
this(ref const Loc loc, AST.Module _module, const(char)[] input, bool doDocComment, DiagnosticReporter diagnosticReporter);
Use this constructor for string mixins.

Input loc location in source file of mixin

RootObject parseTypeOrAssignExp(TOK endtoken = TOK.reserved);
Parse a Type or an Expression
RootObject representing the AST
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

AST.Expression parsePrimaryExp();
Expression Parser
static StorageClass isBuiltinAtAttribute(Identifier ident);
Recognize builtin @ attributes
Identifier ident identifier
storage class for attribute, 0 if not