- abandonBookmark
void abandonBookmark(Bookmark )
Undocumented in source. Be warned that the author may not have intended to support it.
- advance
Token advance()
Advances to the next token and returns the current token
- attachCommentFromSemicolon
T attachCommentFromSemicolon(T node)
Undocumented in source. Be warned that the author may not have intended to support it.
- current
Token current()
- currentIs
bool currentIs(IdType type)
- currentIsMemberFunctionAttribute
bool currentIsMemberFunctionAttribute()
Undocumented in source. Be warned that the author may not have intended to support it.
- currentIsOneOf
bool currentIsOneOf(IdType[] types)
- error
void error(string message, bool shouldAdvance)
Undocumented in source. Be warned that the author may not have intended to support it.
- expect
const(Token)* expect(IdType type)
Returns a token of the specified type if it was the next token, otherwise
calls the error function and returns null. Advances the lexer by one token.
- goToBookmark
void goToBookmark(Bookmark bookmark)
Undocumented in source. Be warned that the author may not have intended to support it.
- hasMagicDelimiter
bool hasMagicDelimiter()
Undocumented in source. Be warned that the author may not have intended to support it.
- isAssociativeArrayLiteral
bool isAssociativeArrayLiteral()
Undocumented in source. Be warned that the author may not have intended to support it.
- isAttribute
bool isAttribute()
Undocumented in source. Be warned that the author may not have intended to support it.
- isAutoDeclaration
DecType isAutoDeclaration(size_t beginIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
- isCastQualifier
bool isCastQualifier()
Undocumented in source. Be warned that the author may not have intended to support it.
- isDeclaration
bool isDeclaration()
Undocumented in source. Be warned that the author may not have intended to support it.
- isStorageClass
bool isStorageClass()
Undocumented in source. Be warned that the author may not have intended to support it.
- isType
bool isType()
Only use this in template parameter parsing
- moreTokens
bool moreTokens()
- ownArray
void ownArray(T[] arr, StackBuffer sb)
Undocumented in source. Be warned that the author may not have intended to support it.
- parseAddExpression
ExpressionNode parseAddExpression()
- parseAliasDeclaration
AliasDeclaration parseAliasDeclaration()
Parses an AliasDeclaration.
- parseAliasInitializer
AliasInitializer parseAliasInitializer()
Parses an AliasInitializer.
- parseAliasThisDeclaration
AliasThisDeclaration parseAliasThisDeclaration()
Parses an AliasThisDeclaration.
- parseAlignAttribute
AlignAttribute parseAlignAttribute()
Parses an AlignAttribute.
- parseAndAndExpression
ExpressionNode parseAndAndExpression()
Parses an AndAndExpression.
- parseAndExpression
ExpressionNode parseAndExpression()
- parseAnonymousEnumDeclaration
AnonymousEnumDeclaration parseAnonymousEnumDeclaration()
$(GRAMMAR $(RULEDEF anonymousEnumDeclaration):
$(LITERAL 'enum') ($(LITERAL ':') $(RULE type))? $(LITERAL '{') $(RULE anonymousEnumMember)+ $(LITERAL '}')
;)
- parseAnonymousEnumMember
AnonymousEnumMember parseAnonymousEnumMember(bool typeAllowed)
$(GRAMMAR $(RULEDEF anonymousEnumMember):
$(RULE type) $(LITERAL identifier) $(LITERAL '=') $(RULE assignExpression)
| $(LITERAL identifier) $(LITERAL '=') $(RULE assignExpression)
| $(LITERAL identifier)
;)
- parseArgumentList
ArgumentList parseArgumentList()
- parseArguments
Arguments parseArguments()
- parseArrayInitializer
ArrayInitializer parseArrayInitializer()
Parses an ArrayInitializer.
- parseArrayLiteral
ArrayLiteral parseArrayLiteral()
- parseArrayMemberInitialization
ArrayMemberInitialization parseArrayMemberInitialization()
Parses an ArrayMemberInitialization.
- parseAsmAddExp
ExpressionNode parseAsmAddExp()
- parseAsmAndExp
ExpressionNode parseAsmAndExp()
- parseAsmBrExp
AsmBrExp parseAsmBrExp()
- parseAsmEqualExp
ExpressionNode parseAsmEqualExp()
- parseAsmExp
ExpressionNode parseAsmExp()
- parseAsmInstruction
AsmInstruction parseAsmInstruction()
- parseAsmLogAndExp
ExpressionNode parseAsmLogAndExp()
- parseAsmLogOrExp
ExpressionNode parseAsmLogOrExp()
- parseAsmMulExp
ExpressionNode parseAsmMulExp()
- parseAsmOrExp
ExpressionNode parseAsmOrExp()
- parseAsmPrimaryExp
AsmPrimaryExp parseAsmPrimaryExp()
- parseAsmRelExp
ExpressionNode parseAsmRelExp()
- parseAsmShiftExp
ExpressionNode parseAsmShiftExp()
- parseAsmStatement
AsmStatement parseAsmStatement()
- parseAsmTypePrefix
AsmTypePrefix parseAsmTypePrefix()
- parseAsmUnaExp
AsmUnaExp parseAsmUnaExp()
- parseAsmXorExp
ExpressionNode parseAsmXorExp()
- parseAssertExpression
AssertExpression parseAssertExpression()
Parses an AssertExpression
- parseAssignExpression
ExpressionNode parseAssignExpression()
Parses an AssignExpression
- parseAssocArrayLiteral
AssocArrayLiteral parseAssocArrayLiteral()
Parses an AssocArrayLiteral
- parseAtAttribute
AtAttribute parseAtAttribute()
- parseAttribute
Attribute parseAttribute()
- parseAttributeDeclaration
AttributeDeclaration parseAttributeDeclaration(Attribute attribute)
Parses an AttributeDeclaration
- parseAutoDeclaration
AutoDeclaration parseAutoDeclaration()
Parses an AutoDeclaration
- parseBaseClass
BaseClass parseBaseClass()
- parseBaseClassList
BaseClassList parseBaseClassList()
- parseBlockStatement
BlockStatement parseBlockStatement()
- parseBodyStatement
BodyStatement parseBodyStatement()
- parseBreakStatement
BreakStatement parseBreakStatement()
- parseBuiltinType
IdType parseBuiltinType()
- parseCaseRangeStatement
CaseRangeStatement parseCaseRangeStatement(ExpressionNode low)
Parses a CaseRangeStatement
- parseCaseStatement
CaseStatement parseCaseStatement(ArgumentList argumentList)
- parseCastExpression
CastExpression parseCastExpression()
- parseCastQualifier
CastQualifier parseCastQualifier()
- parseCatch
Catch parseCatch()
- parseCatches
Catches parseCatches()
- parseClassDeclaration
ClassDeclaration parseClassDeclaration()
Parses a ClassDeclaration
- parseCmpExpression
ExpressionNode parseCmpExpression()
- parseCommaSeparatedRule
ListType parseCommaSeparatedRule(bool allowTrailingComma)
Undocumented in source. Be warned that the author may not have intended to support it.
- parseCompileCondition
CompileCondition parseCompileCondition()
Parses a CompileCondition
- parseConditionalDeclaration
ConditionalDeclaration parseConditionalDeclaration(bool strict)
Parses a ConditionalDeclaration
- parseConditionalStatement
ConditionalStatement parseConditionalStatement()
Parses a ConditionalStatement
- parseConstraint
Constraint parseConstraint()
- parseConstructor
Constructor parseConstructor()
- parseContinueStatement
ContinueStatement parseContinueStatement()
Parses an ContinueStatement
- parseDebugCondition
DebugCondition parseDebugCondition()
- parseDebugSpecification
DebugSpecification parseDebugSpecification()
Parses a DebugSpecification
- parseDeclaration
Declaration parseDeclaration(bool strict, bool mustBeDeclaration)
- parseDeclarationOrStatement
DeclarationOrStatement parseDeclarationOrStatement()
Parses a DeclarationOrStatement
- parseDeclarationsAndStatements
DeclarationsAndStatements parseDeclarationsAndStatements(bool includeCases)
Parses DeclarationsAndStatements
- parseDeclarator
Declarator parseDeclarator()
- parseDefaultStatement
DefaultStatement parseDefaultStatement()
Parses a DefaultStatement
- parseDeleteExpression
DeleteExpression parseDeleteExpression()
Parses a DeleteExpression
- parseDeprecated
Deprecated parseDeprecated()
Parses a Deprecated attribute
- parseDestructor
Destructor parseDestructor()
- parseDoStatement
DoStatement parseDoStatement()
- parseEnumBody
EnumBody parseEnumBody()
- parseEnumDeclaration
EnumDeclaration parseEnumDeclaration()
Parses an EnumDeclaration
- parseEnumMember
EnumMember parseEnumMember()
- parseEponymousTemplateDeclaration
EponymousTemplateDeclaration parseEponymousTemplateDeclaration()
Parses an EponymousTemplateDeclaration
- parseEqualExpression
EqualExpression parseEqualExpression(ExpressionNode shift)
Parses an EqualExpression
- parseExpression
Expression parseExpression()
- parseExpressionStatement
ExpressionStatement parseExpressionStatement(Expression expression)
Parses an ExpressionStatement
- parseFinalSwitchStatement
FinalSwitchStatement parseFinalSwitchStatement()
Parses a FinalSwitchStatement
- parseFinally
Finally parseFinally()
- parseForStatement
ForStatement parseForStatement()
- parseForeachStatement
ForeachStatement parseForeachStatement()
Parses a ForeachStatement
- parseForeachType
ForeachType parseForeachType()
- parseForeachTypeList
ForeachTypeList parseForeachTypeList()
- parseFunctionAttribute
FunctionAttribute parseFunctionAttribute(bool validate)
Parses a FunctionAttribute
- parseFunctionBody
FunctionBody parseFunctionBody()
- parseFunctionCallExpression
FunctionCallExpression parseFunctionCallExpression(UnaryExpression unary)
Parses a FunctionCallExpression
- parseFunctionDeclaration
FunctionDeclaration parseFunctionDeclaration(Type type, bool isAuto, Attribute[] attributes)
Parses a FunctionDeclaration
- parseFunctionLiteralExpression
FunctionLiteralExpression parseFunctionLiteralExpression()
Parses a FunctionLiteralExpression
- parseGotoStatement
GotoStatement parseGotoStatement()
- parseIdentifierChain
IdentifierChain parseIdentifierChain()
Parses an IdentifierChain
- parseIdentifierList
IdentifierList parseIdentifierList()
- parseIdentifierOrTemplateChain
IdentifierOrTemplateChain parseIdentifierOrTemplateChain()
Parses an IdentifierOrTemplateChain
- parseIdentifierOrTemplateInstance
IdentifierOrTemplateInstance parseIdentifierOrTemplateInstance()
Parses an IdentifierOrTemplateInstance
- parseIdentityExpression
ExpressionNode parseIdentityExpression(ExpressionNode shift)
Parses an IdentityExpression
- parseIfStatement
IfStatement parseIfStatement()
- parseImportBind
ImportBind parseImportBind()
- parseImportBindings
ImportBindings parseImportBindings(SingleImport singleImport)
- parseImportDeclaration
ImportDeclaration parseImportDeclaration()
Parses an ImportDeclaration
- parseImportExpression
ImportExpression parseImportExpression()
Parses an ImportExpression
- parseInExpression
ExpressionNode parseInExpression(ExpressionNode shift)
- parseInStatement
InStatement parseInStatement()
- parseIndex
Index parseIndex()
- parseIndexExpression
IndexExpression parseIndexExpression(UnaryExpression unaryExpression)
Parses an IndexExpression
- parseInitializer
Initializer parseInitializer()
- parseInterfaceDeclaration
InterfaceDeclaration parseInterfaceDeclaration()
Parses an InterfaceDeclaration
- parseInterfaceOrClass
N parseInterfaceOrClass(N node)
Undocumented in source. Be warned that the author may not have intended to support it.
- parseInvariant
Invariant parseInvariant()
- parseIsExpression
IsExpression parseIsExpression()
- parseKeyValuePair
KeyValuePair parseKeyValuePair()
- parseKeyValuePairs
KeyValuePairs parseKeyValuePairs()
- parseLabeledStatement
LabeledStatement parseLabeledStatement()
Parses a LabeledStatement
- parseLastCatch
LastCatch parseLastCatch()
- parseLeftAssocBinaryExpression
ExpressionNode parseLeftAssocBinaryExpression(ExpressionNode part)
Undocumented in source. Be warned that the author may not have intended to support it.
- parseLinkageAttribute
LinkageAttribute parseLinkageAttribute()
Parses a LinkageAttribute
- parseMemberFunctionAttribute
MemberFunctionAttribute parseMemberFunctionAttribute()
Parses a MemberFunctionAttribute
- parseMixinDeclaration
MixinDeclaration parseMixinDeclaration()
Parses a MixinDeclaration
- parseMixinExpression
MixinExpression parseMixinExpression()
- parseMixinTemplateDeclaration
MixinTemplateDeclaration parseMixinTemplateDeclaration()
Parses a MixinTemplateDeclaration
- parseMixinTemplateName
MixinTemplateName parseMixinTemplateName()
Parses a MixinTemplateName
- parseModule
Module parseModule()
- parseModuleDeclaration
ModuleDeclaration parseModuleDeclaration()
Parses a ModuleDeclaration
- parseMulExpression
ExpressionNode parseMulExpression()
- parseNewAnonClassExpression
NewAnonClassExpression parseNewAnonClassExpression()
Parses a NewAnonClassExpression
- parseNewExpression
NewExpression parseNewExpression()
- parseNonVoidInitializer
NonVoidInitializer parseNonVoidInitializer()
Parses a NonVoidInitializer
- parseOperands
Operands parseOperands()
- parseOrExpression
ExpressionNode parseOrExpression()
- parseOrOrExpression
ExpressionNode parseOrOrExpression()
- parseOutStatement
OutStatement parseOutStatement()
- parseParameter
Parameter parseParameter()
- parseParameterAttribute
IdType parseParameterAttribute(bool validate)
Parses a ParameterAttribute
- parseParameters
Parameters parseParameters()
- parsePostblit
Postblit parsePostblit()
- parsePowExpression
ExpressionNode parsePowExpression()
- parsePragmaDeclaration
PragmaDeclaration parsePragmaDeclaration()
Parses a PragmaDeclaration
- parsePragmaExpression
PragmaExpression parsePragmaExpression()
Parses a PragmaExpression
- parsePrimaryExpression
PrimaryExpression parsePrimaryExpression()
Parses a PrimaryExpression
- parseRegister
Register parseRegister()
- parseRelExpression
ExpressionNode parseRelExpression(ExpressionNode shift)
- parseReturnStatement
ReturnStatement parseReturnStatement()
- parseScopeGuardStatement
ScopeGuardStatement parseScopeGuardStatement()
Parses a ScopeGuardStatement
- parseSharedStaticConstructor
SharedStaticConstructor parseSharedStaticConstructor()
Parses a SharedStaticConstructor
- parseSharedStaticDestructor
SharedStaticDestructor parseSharedStaticDestructor()
Parses a SharedStaticDestructor
- parseShiftExpression
ExpressionNode parseShiftExpression()
- parseSingleImport
SingleImport parseSingleImport()
- parseStatement
Statement parseStatement()
- parseStatementNoCaseNoDefault
StatementNoCaseNoDefault parseStatementNoCaseNoDefault()
Parses a StatementNoCaseNoDefault
- parseStaticAssertDeclaration
StaticAssertDeclaration parseStaticAssertDeclaration()
Parses a StaticAssertDeclaration
- parseStaticAssertStatement
StaticAssertStatement parseStaticAssertStatement()
Parses a StaticAssertStatement
- parseStaticConstructor
StaticConstructor parseStaticConstructor()
Parses a StaticConstructor
- parseStaticCtorDtorCommon
N parseStaticCtorDtorCommon(N node)
Undocumented in source. Be warned that the author may not have intended to support it.
- parseStaticDestructor
StaticDestructor parseStaticDestructor()
Parses a StaticDestructor
- parseStaticIfCondition
StaticIfCondition parseStaticIfCondition()
Parses an StaticIfCondition
- parseStorageClass
StorageClass parseStorageClass()
- parseStructBody
StructBody parseStructBody()
- parseStructDeclaration
StructDeclaration parseStructDeclaration()
Parses a StructDeclaration
- parseStructInitializer
StructInitializer parseStructInitializer()
Parses an StructInitializer
- parseStructMemberInitializer
StructMemberInitializer parseStructMemberInitializer()
Parses a StructMemberInitializer
- parseStructMemberInitializers
StructMemberInitializers parseStructMemberInitializers()
Parses StructMemberInitializers
- parseSwitchStatement
SwitchStatement parseSwitchStatement()
- parseSymbol
Symbol parseSymbol()
- parseSynchronizedStatement
SynchronizedStatement parseSynchronizedStatement()
Parses a SynchronizedStatement
- parseTemplateAliasParameter
TemplateAliasParameter parseTemplateAliasParameter()
Parses a TemplateAliasParameter
- parseTemplateArgument
TemplateArgument parseTemplateArgument()
Parses a TemplateArgument
- parseTemplateArgumentList
TemplateArgumentList parseTemplateArgumentList()
Parses a TemplateArgumentList
- parseTemplateArguments
TemplateArguments parseTemplateArguments()
- parseTemplateDeclaration
TemplateDeclaration parseTemplateDeclaration()
Parses a TemplateDeclaration
- parseTemplateInstance
TemplateInstance parseTemplateInstance()
Parses a TemplateInstance
- parseTemplateMixinExpression
TemplateMixinExpression parseTemplateMixinExpression()
Parses a TemplateMixinExpression
- parseTemplateParameter
TemplateParameter parseTemplateParameter()
Parses a TemplateParameter
- parseTemplateParameterList
TemplateParameterList parseTemplateParameterList()
Parses a TemplateParameterList
- parseTemplateParameters
TemplateParameters parseTemplateParameters()
Parses TemplateParameters
- parseTemplateSingleArgument
TemplateSingleArgument parseTemplateSingleArgument()
Parses a TemplateSingleArgument
- parseTemplateThisParameter
TemplateThisParameter parseTemplateThisParameter()
Parses a TemplateThisParameter
- parseTemplateTupleParameter
TemplateTupleParameter parseTemplateTupleParameter()
Parses an TemplateTupleParameter
- parseTemplateTypeParameter
TemplateTypeParameter parseTemplateTypeParameter()
Parses a TemplateTypeParameter
- parseTemplateValueParameter
TemplateValueParameter parseTemplateValueParameter()
Parses a TemplateValueParameter
- parseTemplateValueParameterDefault
TemplateValueParameterDefault parseTemplateValueParameterDefault()
Parses a TemplateValueParameterDefault
- parseTernaryExpression
ExpressionNode parseTernaryExpression()
Parses a TernaryExpression
- parseThrowStatement
ThrowStatement parseThrowStatement()
- parseTraitsExpression
TraitsExpression parseTraitsExpression()
Parses an TraitsExpression
- parseTryStatement
TryStatement parseTryStatement()
- parseType
Type parseType()
- parseType2
Type2 parseType2()
- parseTypeConstructor
IdType parseTypeConstructor(bool validate)
- parseTypeConstructors
IdType[] parseTypeConstructors()
- parseTypeSpecialization
TypeSpecialization parseTypeSpecialization()
Parses a TypeSpecialization
- parseTypeSuffix
TypeSuffix parseTypeSuffix()
- parseTypeidExpression
TypeidExpression parseTypeidExpression()
Parses a TypeidExpression
- parseTypeofExpression
TypeofExpression parseTypeofExpression()
Parses a TypeofExpression
- parseUnaryExpression
UnaryExpression parseUnaryExpression()
- parseUnionDeclaration
UnionDeclaration parseUnionDeclaration()
Parses an UnionDeclaration
- parseUnittest
Unittest parseUnittest()
- parseVariableDeclaration
VariableDeclaration parseVariableDeclaration(Type type, bool isAuto)
Parses a VariableDeclaration
- parseVector
Vector parseVector()
- parseVersionCondition
VersionCondition parseVersionCondition()
Parses a VersionCondition
- parseVersionSpecification
VersionSpecification parseVersionSpecification()
Parses a VersionSpecification
- parseWhileStatement
WhileStatement parseWhileStatement()
- parseWithStatement
WithStatement parseWithStatement()
- parseXorExpression
ExpressionNode parseXorExpression()
- peek
const(Token)* peek()
Undocumented in source. Be warned that the author may not have intended to support it.
- peekIs
bool peekIs(IdType t)
Undocumented in source. Be warned that the author may not have intended to support it.
- peekIsOneOf
bool peekIsOneOf(IdType[] types)
Undocumented in source. Be warned that the author may not have intended to support it.
- peekPast
const(Token)* peekPast()
Undocumented in source. Be warned that the author may not have intended to support it.
- peekPastBraces
const(Token)* peekPastBraces()
Undocumented in source. Be warned that the author may not have intended to support it.
- peekPastBrackets
const(Token)* peekPastBrackets()
Undocumented in source. Be warned that the author may not have intended to support it.
- peekPastParens
const(Token)* peekPastParens()
Undocumented in source. Be warned that the author may not have intended to support it.
- setBookmark
Bookmark setBookmark()
Undocumented in source. Be warned that the author may not have intended to support it.
- setTokens
void setTokens(const(Token)[] tokens)
Undocumented in source. Be warned that the author may not have intended to support it.
- skip
void skip()
Undocumented in source. Be warned that the author may not have intended to support it.
- skipBraces
void skipBraces()
Undocumented in source. Be warned that the author may not have intended to support it.
- skipBrackets
void skipBrackets()
Undocumented in source. Be warned that the author may not have intended to support it.
- skipParens
void skipParens()
Undocumented in source. Be warned that the author may not have intended to support it.
- startsWith
bool startsWith(IdType[] types)
Undocumented in source. Be warned that the author may not have intended to support it.
- trace
void trace(string message)
Undocumented in source. Be warned that the author may not have intended to support it.
- trace
void trace(string )
Undocumented in source. Be warned that the author may not have intended to support it.
- warn
void warn(string message)
Undocumented in source. Be warned that the author may not have intended to support it.
D Parser.
It is sometimes useful to sub-class Parser to skip over things that are not interesting. For example, DCD skips over function bodies when caching symbols from imported files.