Function Parser.parseDeclaration
Parses a Declaration
Declaration parseDeclaration
(
bool strict = false,
bool mustBeDeclaration = false,
bool inTemplateDeclaration = false
);
Parameters
Name | Description |
---|---|
strict | if true, do not return partial AST nodes on errors. |
mustBeDeclaration | do not parse as a declaration if it could be parsed as a function call |
inTemplateDeclaration | if this function is called from a templated context declaration: attribute* declaration2 | attribute+ '{' declaration* '}' ; declaration2: aliasDeclaration | aliasAssign | aliasThisDeclaration | anonymousEnumDeclaration | attributeDeclaration | classDeclaration | conditionalDeclaration | constructor | debugSpecification | destructor | enumDeclaration | eponymousTemplateDeclaration | functionDeclaration | importDeclaration | interfaceDeclaration | invariant | mixinDeclaration | mixinTemplateDeclaration | pragmaDeclaration | sharedStaticConstructor | sharedStaticDestructor | staticAssertDeclaration | staticConstructor | staticDestructor | structDeclaration | templateDeclaration | unionDeclaration | unittest | variableDeclaration | versionSpecification ; |