diff options
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; |