diff options
author | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-05 10:31:15 +0100 |
---|---|---|
committer | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-05 10:31:15 +0100 |
commit | 1dbdea5fcc3973ebd4f10c7a9cdb84855ee6c57f (patch) | |
tree | 68a4f708a2119629218f4326acf9dfd04c59e6ee /shared/cplusplus | |
parent | 4fcadbdd49879c43c77d25faab833422bb82dd3a (diff) | |
download | qt-creator-1dbdea5fcc3973ebd4f10c7a9cdb84855ee6c57f.tar.gz |
Implemented MemInitializerAST::lastToken().
Diffstat (limited to 'shared/cplusplus')
-rw-r--r-- | shared/cplusplus/AST.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/shared/cplusplus/AST.cpp b/shared/cplusplus/AST.cpp index 90cd140ef8..f894a16167 100644 --- a/shared/cplusplus/AST.cpp +++ b/shared/cplusplus/AST.cpp @@ -1631,7 +1631,6 @@ unsigned LinkageSpecificationAST::firstToken() const unsigned LinkageSpecificationAST::lastToken() const { - assert(0 && "review me"); if (declaration) return declaration->lastToken(); else if (extern_type) @@ -1653,8 +1652,13 @@ unsigned MemInitializerAST::firstToken() const unsigned MemInitializerAST::lastToken() const { - assert(0 && "review me"); - return rparen_token + 1; + if (rparen_token) + return rparen_token + 1; + else if (expression) + return expression->lastToken(); + else if (lparen_token) + return lparen_token + 1; + return name->lastToken(); } void MemberAccessAST::accept0(ASTVisitor *visitor) |