Fixes for the ObjC AST. Now it should be complete.

This commit is contained in:
Erik Verbruggen
2009-07-20 11:46:59 +02:00
parent 0eef527746
commit 336e1dc5fb
8 changed files with 183 additions and 31 deletions

View File

@@ -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;