summaryrefslogtreecommitdiff
path: root/shared/cplusplus/AST.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <qtc-committer@nokia.com>2009-01-05 10:41:26 +0100
committerRoberto Raggi <qtc-committer@nokia.com>2009-01-05 10:41:26 +0100
commitbf554cb45c38bf724480efb14bb40b60112fb379 (patch)
tree745e20e8a9ee2e870ff0ba9326873f5293c2e086 /shared/cplusplus/AST.cpp
parentae49c6b4874e07fda31aea4856cee576fc03e7e2 (diff)
downloadqt-creator-bf554cb45c38bf724480efb14bb40b60112fb379.tar.gz
Implemented NestedDeclaratorAST::lastToken().
Diffstat (limited to 'shared/cplusplus/AST.cpp')
-rw-r--r--shared/cplusplus/AST.cpp7
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)