diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2009-07-20 11:46:59 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@nokia.com> | 2009-07-20 11:46:59 +0200 |
commit | 336e1dc5fb596ff7ed84e3a405a1efd578ee4330 (patch) | |
tree | a9973006aa82733a3b5cad24f23fc35bf22ec49c /src/shared/cplusplus/AST.cpp | |
parent | 0eef527746703c067dff7de84a90d71e4509c361 (diff) | |
download | qt-creator-336e1dc5fb596ff7ed84e3a405a1efd578ee4330.tar.gz |
Fixes for the ObjC AST. Now it should be complete.
Diffstat (limited to 'src/shared/cplusplus/AST.cpp')
-rw-r--r-- | src/shared/cplusplus/AST.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/shared/cplusplus/AST.cpp b/src/shared/cplusplus/AST.cpp index e8ecfa07cd..0eae1bd0fe 100644 --- a/src/shared/cplusplus/AST.cpp +++ b/src/shared/cplusplus/AST.cpp @@ -1997,7 +1997,10 @@ unsigned ObjCClassInterfaceDeclarationAST::lastToken() const unsigned ObjCCategoryInterfaceDeclarationAST::firstToken() const { - return interface_token; + if (attributes) + return attributes->firstToken(); + else + return interface_token; } unsigned ObjCCategoryInterfaceDeclarationAST::lastToken() const @@ -2319,6 +2322,32 @@ unsigned ObjCMethodPrototypeAST::lastToken() const return method_type_token + 1; } +unsigned ObjCMethodDeclarationAST::firstToken() const +{ + return method_prototype->firstToken(); +} + +unsigned ObjCMethodDeclarationAST::lastToken() const +{ + if (semicolon_token) + return semicolon_token + 1; + else + return method_prototype->lastToken(); +} + +unsigned ObjCMethodDefinitionAST::firstToken() const +{ + return method_prototype->firstToken(); +} + +unsigned ObjCMethodDefinitionAST::lastToken() const +{ + if (function_body) + return function_body->lastToken(); + else + return method_prototype->lastToken(); +} + unsigned ObjCClassImplementationAST::firstToken() const { return implementation_token; |