diff options
author | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-02 17:48:31 +0100 |
---|---|---|
committer | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-02 17:48:31 +0100 |
commit | f32c63abd2d4319f5254ddf630f72186d66787ae (patch) | |
tree | 0c657789993837536a24e7667506e26f9d37d10a /shared | |
parent | 698ec21284c4164878fda28ee944b48cd2fad7fd (diff) | |
download | qt-creator-f32c63abd2d4319f5254ddf630f72186d66787ae.tar.gz |
Implemented DeleteExpressionAST::lastToken().
Diffstat (limited to 'shared')
-rw-r--r-- | shared/cplusplus/AST.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/shared/cplusplus/AST.cpp b/shared/cplusplus/AST.cpp index b21dc4e302..5bfecfc9da 100644 --- a/shared/cplusplus/AST.cpp +++ b/shared/cplusplus/AST.cpp @@ -1083,7 +1083,6 @@ unsigned DeclarationStatementAST::firstToken() const unsigned DeclarationStatementAST::lastToken() const { - assert(0 && "review me"); return declaration->lastToken(); } @@ -1101,7 +1100,6 @@ unsigned DeclaratorIdAST::firstToken() const unsigned DeclaratorIdAST::lastToken() const { - assert(0 && "review me"); return name->lastToken(); } @@ -1120,7 +1118,6 @@ unsigned DeclaratorListAST::firstToken() const unsigned DeclaratorListAST::lastToken() const { - assert(0 && "review me"); for (const DeclaratorListAST *it = this; it; it = it->next) { if (! it->next) return it->lastToken(); @@ -1144,12 +1141,15 @@ unsigned DeleteExpressionAST::firstToken() const unsigned DeleteExpressionAST::lastToken() const { - assert(0 && "review me"); if (expression) return expression->lastToken(); else if (rbracket_token) return rbracket_token + 1; - return delete_token + 1; + else if (lbracket_token) + return lbracket_token + 1; + else if (delete_token) + return delete_token + 1; + return scope_token + 1; } void DestructorNameAST::accept0(ASTVisitor *visitor) |