diff options
author | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-06 11:38:38 +0100 |
---|---|---|
committer | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-06 11:45:29 +0100 |
commit | b563081e26cc2f128a459a07269e56457a796852 (patch) | |
tree | 43a8c5a1d4b06f5cd807aa2542eb93b61a81da5b /shared | |
parent | 6f8b3d3d2dc65f1c2019c99d500de35261dcb3d6 (diff) | |
download | qt-creator-b563081e26cc2f128a459a07269e56457a796852.tar.gz |
More *AST::lastToken().
Diffstat (limited to 'shared')
-rw-r--r-- | shared/cplusplus/AST.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shared/cplusplus/AST.cpp b/shared/cplusplus/AST.cpp index 96b941fddf..6f2e69ea3f 100644 --- a/shared/cplusplus/AST.cpp +++ b/shared/cplusplus/AST.cpp @@ -1914,7 +1914,6 @@ unsigned NewTypeIdAST::firstToken() const unsigned NewTypeIdAST::lastToken() const { - assert(0 && "review me"); if (new_declarator) return new_declarator->lastToken(); else if (new_initializer) @@ -1923,6 +1922,8 @@ unsigned NewTypeIdAST::lastToken() const if (! it->next) return it->lastToken(); } + + // ### assert? return 0; } @@ -1939,7 +1940,6 @@ unsigned NumericLiteralAST::firstToken() const unsigned NumericLiteralAST::lastToken() const { - assert(0 && "review me"); return token + 1; } @@ -1956,9 +1956,10 @@ unsigned OperatorAST::firstToken() const unsigned OperatorAST::lastToken() const { - assert(0 && "review me"); if (close_token) return close_token + 1; + else if (open_token) + return open_token + 1; return op_token + 1; } @@ -1976,7 +1977,6 @@ unsigned OperatorFunctionIdAST::firstToken() const unsigned OperatorFunctionIdAST::lastToken() const { - assert(0 && "review me"); if (op) return op->lastToken(); return operator_token + 1; |