diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-10 16:19:52 +0100 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-10 16:20:13 +0100 |
commit | e5eb88a31f435eb1dae0f51f969701339a97a79d (patch) | |
tree | b34e3e2008862639f17d84527e0acc4d564a3318 /src/shared/cplusplus/AST.h | |
parent | cdb144321926d1c43242deeaffa0fb8e55873014 (diff) | |
download | qt-creator-e5eb88a31f435eb1dae0f51f969701339a97a79d.tar.gz |
Ported the accept methods.
Diffstat (limited to 'src/shared/cplusplus/AST.h')
-rw-r--r-- | src/shared/cplusplus/AST.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/shared/cplusplus/AST.h b/src/shared/cplusplus/AST.h index c8cb6694af..46718574d6 100644 --- a/src/shared/cplusplus/AST.h +++ b/src/shared/cplusplus/AST.h @@ -81,15 +81,18 @@ public: unsigned lastToken() const { - unsigned token = 0; + _Tp lastValue = 0; for (const List *it = this; it; it = it->next) { if (it->value) - token = it->value->lastToken(); + lastValue = it->value; } - // assert(token != 0); - return token; + if (lastValue) + return lastValue->lastToken(); + + // ### assert(0); + return 0; } _Tp value; @@ -616,7 +619,7 @@ protected: class CPLUSPLUS_EXPORT ConditionAST: public ExpressionAST { public: - SpecifierListAST *type_specifier; + SpecifierListAST *type_specifiers; DeclaratorAST *declarator; public: |