diff options
author | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-05 10:40:11 +0100 |
---|---|---|
committer | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-05 10:40:11 +0100 |
commit | ae49c6b4874e07fda31aea4856cee576fc03e7e2 (patch) | |
tree | 738c2e29c1f3a45b35f8cfd518c63a8c47c0310c /shared/cplusplus/AST.cpp | |
parent | fdd77d8c7dab2576d368c06a0c8f7c66f15e2bb6 (diff) | |
download | qt-creator-ae49c6b4874e07fda31aea4856cee576fc03e7e2.tar.gz |
Implemented NamespaceAliasDefinitionAST::lastToken().
Diffstat (limited to 'shared/cplusplus/AST.cpp')
-rw-r--r-- | shared/cplusplus/AST.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/shared/cplusplus/AST.cpp b/shared/cplusplus/AST.cpp index 761e1bd535..7165bacbcf 100644 --- a/shared/cplusplus/AST.cpp +++ b/shared/cplusplus/AST.cpp @@ -1744,8 +1744,15 @@ unsigned NamespaceAliasDefinitionAST::firstToken() const unsigned NamespaceAliasDefinitionAST::lastToken() const { - assert(0 && "review me"); - return semicolon_token + 1; + if (semicolon_token) + return semicolon_token + 1; + else if (name) + return name->lastToken(); + else if (equal_token) + return equal_token + 1; + else if (namespace_name) + return namespace_name + 1; + return namespace_token + 1; } void NestedDeclaratorAST::accept0(ASTVisitor *visitor) |