diff options
author | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-02 16:10:00 +0100 |
---|---|---|
committer | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-02 16:10:00 +0100 |
commit | bdf1800d83eef2c3940ed93466d3387fe2e172ee (patch) | |
tree | cee7bc4c07b0ad5d18883e0a23c43cbd5439c4fc /shared | |
parent | f0ac751f4a167f2b2da5a21f8c62394c4486d268 (diff) | |
download | qt-creator-bdf1800d83eef2c3940ed93466d3387fe2e172ee.tar.gz |
Added `colon_token' to ClassSpecifierAST.
Diffstat (limited to 'shared')
-rw-r--r-- | shared/cplusplus/AST.h | 1 | ||||
-rw-r--r-- | shared/cplusplus/Parser.cpp | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/shared/cplusplus/AST.h b/shared/cplusplus/AST.h index c4b0f7fe76..f9960f80d7 100644 --- a/shared/cplusplus/AST.h +++ b/shared/cplusplus/AST.h @@ -444,6 +444,7 @@ public: unsigned classkey_token; SpecifierAST *attributes; NameAST *name; + unsigned colon_token; BaseSpecifierAST *base_clause; unsigned lbrace_token; DeclarationAST *member_specifiers; diff --git a/shared/cplusplus/Parser.cpp b/shared/cplusplus/Parser.cpp index 549a74ce11..05836e9fca 100644 --- a/shared/cplusplus/Parser.cpp +++ b/shared/cplusplus/Parser.cpp @@ -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) |