diff options
author | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-05 10:41:26 +0100 |
---|---|---|
committer | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-05 10:41:26 +0100 |
commit | bf554cb45c38bf724480efb14bb40b60112fb379 (patch) | |
tree | 745e20e8a9ee2e870ff0ba9326873f5293c2e086 /shared/cplusplus/AST.cpp | |
parent | ae49c6b4874e07fda31aea4856cee576fc03e7e2 (diff) | |
download | qt-creator-bf554cb45c38bf724480efb14bb40b60112fb379.tar.gz |
Implemented NestedDeclaratorAST::lastToken().
Diffstat (limited to 'shared/cplusplus/AST.cpp')
-rw-r--r-- | shared/cplusplus/AST.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/shared/cplusplus/AST.cpp b/shared/cplusplus/AST.cpp index 7165bacbcf..5ddfe4774c 100644 --- a/shared/cplusplus/AST.cpp +++ b/shared/cplusplus/AST.cpp @@ -1769,8 +1769,11 @@ unsigned NestedDeclaratorAST::firstToken() const unsigned NestedDeclaratorAST::lastToken() const { - assert(0 && "review me"); - return rparen_token + 1; + if (rparen_token) + return rparen_token + 1; + else if (declarator) + return declarator->lastToken(); + return lparen_token + 1; } void NestedExpressionAST::accept0(ASTVisitor *visitor) |