diff options
author | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-05 10:34:06 +0100 |
---|---|---|
committer | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-05 10:34:45 +0100 |
commit | fdd77d8c7dab2576d368c06a0c8f7c66f15e2bb6 (patch) | |
tree | d96954cdc833f16b4dbcfbfefe94c7b44fe13a3d /shared/cplusplus/AST.cpp | |
parent | cc8382189062153e45db3fd6729fdc8e2e211c4e (diff) | |
download | qt-creator-fdd77d8c7dab2576d368c06a0c8f7c66f15e2bb6.tar.gz |
Implemented NamespaceAST::lastToken().
Diffstat (limited to 'shared/cplusplus/AST.cpp')
-rw-r--r-- | shared/cplusplus/AST.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/shared/cplusplus/AST.cpp b/shared/cplusplus/AST.cpp index 911ba399ed..761e1bd535 100644 --- a/shared/cplusplus/AST.cpp +++ b/shared/cplusplus/AST.cpp @@ -1696,7 +1696,6 @@ unsigned NamedTypeSpecifierAST::firstToken() const unsigned NamedTypeSpecifierAST::lastToken() const { - assert(0 && "review me"); return name->lastToken(); } @@ -1717,11 +1716,17 @@ unsigned NamespaceAST::firstToken() const unsigned NamespaceAST::lastToken() const { - assert(0 && "review me"); if (linkage_body) return linkage_body->lastToken(); + + for (SpecifierAST *it = attributes; it; it = it->next) { + if (! it->next) + return it->lastToken(); + } + if (identifier_token) return identifier_token + 1; + return namespace_token + 1; } |