Added `colon_token' to ClassSpecifierAST.

This commit is contained in:
Roberto Raggi
2009-01-02 16:10:00 +01:00
parent f0ac751f4a
commit bdf1800d83
2 changed files with 5 additions and 0 deletions

View File

@@ -1196,9 +1196,12 @@ bool Parser::parseClassSpecifier(SpecifierAST *&node)
const bool previousInFunctionBody = _inFunctionBody;
_inFunctionBody = false;
unsigned colon_token = 0;
if (LA() == T_COLON || LA() == T_LBRACE) {
BaseSpecifierAST *base_clause = 0;
if (LA() == T_COLON) {
colon_token = cursor();
parseBaseClause(base_clause);
if (LA() != T_LBRACE) {
_translationUnit->error(cursor(), "expected `{' before `%s'", tok().spell());
@@ -1216,6 +1219,7 @@ bool Parser::parseClassSpecifier(SpecifierAST *&node)
ast->classkey_token = classkey_token;
ast->attributes = attributes;
ast->name = name;
ast->colon_token = colon_token;
ast->base_clause = base_clause;
if (LA() == T_LBRACE)