View source code
Display the source code in dmd/parse.d from which this page was generated on github.
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 local clone.

Class dmd.parse.Parser

class Parser(AST) ;

Constructors

NameDescription
this Use this constructor for string mixins.

Methods

NameDescription
addComment
appendStorageClass Give error on redundant/conflicting storage class.
checkDanglingElse
isDeclaration Determine if the scanner is sitting on the start of a declaration.
parseAggregate Parse struct, union, interface, class.
parseArguments Collect argument list. Assume current token is ',', '(' or '['.
parseAttribute Parse attribute, lexer is on '@'.
parseAutoDeclarations Parse auto declarations of the form: storageClass ident = init, ident = init, ... ; and return the array of them. Starts with token on the first ident. Ends with scanner past closing ';'
parseBaseClasses
parseBasicType2 Parse things that follow the initial type t. t * t [] t [type] t [expression] t [expression .. expression] t function t delegate
parseBlock Parse declarations after an align, protection, or extern decl.
parseConstraint Parse constraint. Constraint is of the form: if ( ConstraintExpression )
parseContracts Parse contracts following function declaration.
parseCtor Parse a constructor definition: this(parameters) { body } or postblit: this(this) { body } or constructor template: this(templateparameters)(parameters) { body } Current token is 'this'.
parseDebugCondition Parse a debug conditional
parseDeclarations Parse Declarations. These can be: 1. declarations at global/class level 2. declarations at statement level Return array of Declaration *'s.
parseDefaultInitExp Parses default argument initializer expression that is an assign expression, with special handling for FILE__, FILE_DIR__, LINE__, MODULE__, FUNCTION__, and PRETTY_FUNCTION__.
parseDelete Parse a delete definition: delete(parameters) { body } Current token is 'delete'.
parseDtor Parse a destructor definition: ~this() { body } Current token is '~'.
parseEnum
parseForeach Parses foreach statements, static foreach statements and static foreach declarations. The template parameter isStatic is true, iff a static foreach should be parsed. If isStatic is true, isDecl can be true to indicate that a static foreach declaration should be parsed.
parseInitializer Parse initializer for variable declaration.
parseInvariant Parse an invariant definition: invariant { statements... } invariant() { statements... } invariant (expression); Current token is 'invariant'.
parseLinkage
parseMixin Parse template mixin. mixin Foo; mixin Foo!(args); mixin a.b.c!(args).Foo!(args); mixin Foo!(args) identifier; mixin typeof(expr).identifier!(args);
parseNew Parse a new definition: new(parameters) { body } Current token is 'new'.
parseNewExp
parseParameters Parse parameter list.
parsePostfix Parse const/immutable/shared/inout/nothrow/pure postfix
parsePrimaryExp Expression Parser
parseQualifiedIdentifier Parse ident1.ident2.ident3
parseSharedStaticCtor Parse a shared static constructor definition: shared static this() { body } Current token is 'shared'.
parseSharedStaticDtor Parse a shared static destructor definition: shared static ~this() { body } Current token is 'shared'.
parseStatement
parseStaticAssert Parse a static assertion. Current token is 'static'.
parseStaticCtor Parse a static constructor definition: static this() { body } Current token is 'static'.
parseStaticDtor Parse a static destructor definition: static ~this() { body } Current token is 'static'.
parseStaticIfCondition static if (expression) body else body Current token is 'static'.
parseTemplateArgumentList Parse template argument list.
parseTemplateArguments Parse template arguments.
parseTemplateDeclaration Parse a TemplateDeclaration.
parseTemplateParameterList Parse template parameter list.
parseTemplateSingleArgument Parse single template argument, to support the syntax: foo!arg
parseTypeof Parse typeof(expression). Current token is on the 'typeof'.
parseTypeOrAssignExp Parse a Type or an Expression
parseUnitTest Parse a unittest definition: unittest { body } Current token is 'unittest'.
parseVector Parse vector(type). Current token is on the 'vector'.
parseVersionCondition Parse a version conditional
skipAttributes Skip attributes.
skipParens Skip parens, brackets.
factory Create instance of class specified by the fully qualified name classname. The class must either have no constructors or have a default constructor.
opCmp Compare with another Object obj.
opEquals Test whether this is equal to o. The default implementation only compares by identity (using the is operator). Generally, overrides for opEquals should attempt to compare objects by their contents.
toHash Compute hash function for Object.
toString Convert Object to a human readable string.

Enums

NameDescription
NeedDeclaratorId

Aliases

NameDescription
ParseForeachArgs Determines additional argument types for parseForeach.
ParseForeachRet Determines the result type for parseForeach.

Authors

Walter Bright

License

Boost License 1.0