diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-10 12:39:29 +0100 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-10 16:20:10 +0100 |
commit | 496ff15db3fa6b2004899345eef58ce5253514a1 (patch) | |
tree | e6c50eebf1f9f52e1195c051c10096912e671ab9 /src/shared/cplusplus/AST.cpp | |
parent | 8efb73f5d2a84d70aae134dcf45cac87c70fa76f (diff) | |
download | qt-creator-496ff15db3fa6b2004899345eef58ce5253514a1.tar.gz |
Removed ObjCIdentifierListAST
Done with Erik Verbruggen
Diffstat (limited to 'src/shared/cplusplus/AST.cpp')
-rw-r--r-- | src/shared/cplusplus/AST.cpp | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/src/shared/cplusplus/AST.cpp b/src/shared/cplusplus/AST.cpp index f47158ce40..4cefd9a012 100644 --- a/src/shared/cplusplus/AST.cpp +++ b/src/shared/cplusplus/AST.cpp @@ -1816,26 +1816,6 @@ unsigned WhileStatementAST::lastToken() const } // ObjC++ -unsigned IdentifierListAST::firstToken() const -{ - if (name) - return name->firstToken(); - // ### assert? - return 0; -} - -unsigned IdentifierListAST::lastToken() const -{ - for (const IdentifierListAST *it = this; it; it = it->next) { - if (! it->next && it->name) { - return it->name->lastToken(); - } - } - // ### assert? - return 0; -} - - unsigned ObjCClassForwardDeclarationAST::firstToken() const { if (attributes) @@ -1848,9 +1828,9 @@ unsigned ObjCClassForwardDeclarationAST::lastToken() const if (semicolon_token) return semicolon_token + 1; - for (IdentifierListAST *it = identifier_list; it; it = it->next) { - if (! it->next && it->name) - return it->name->lastToken(); + for (ObjCIdentifierListAST *it = identifier_list; it; it = it->next) { + if (! it->next && it->value) + return it->value->lastToken(); } return class_token + 1; @@ -1868,9 +1848,9 @@ unsigned ObjCProtocolForwardDeclarationAST::lastToken() const if (semicolon_token) return semicolon_token + 1; - for (IdentifierListAST *it = identifier_list; it; it = it->next) { - if (! it->next && it->name) - return it->name->lastToken(); + for (ObjCIdentifierListAST *it = identifier_list; it; it = it->next) { + if (! it->next && it->value) + return it->value->lastToken(); } return protocol_token + 1; @@ -1949,9 +1929,9 @@ unsigned ObjCProtocolRefsAST::lastToken() const { if (greater_token) return greater_token + 1; - for (IdentifierListAST *it = identifier_list; it; it = it->next) { - if (! it->next && it->name) - return it->name->lastToken(); + for (ObjCIdentifierListAST *it = identifier_list; it; it = it->next) { + if (! it->next && it->value) + return it->value->lastToken(); } return less_token + 1; |