diff options
author | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-12 14:55:33 +0100 |
---|---|---|
committer | Roberto Raggi <qtc-committer@nokia.com> | 2009-01-12 14:56:00 +0100 |
commit | 8078053c994cf20cef150bdceef1bbab647bccef (patch) | |
tree | c164444ae9c94a0476b4990cbdc777e8519a58cf /shared/cplusplus/AST.cpp | |
parent | 54d9d0d46a30b49ce3fef8945454ab0d09d98a68 (diff) | |
download | qt-creator-8078053c994cf20cef150bdceef1bbab647bccef.tar.gz |
Improved ObjC++ support.
Diffstat (limited to 'shared/cplusplus/AST.cpp')
-rw-r--r-- | shared/cplusplus/AST.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/shared/cplusplus/AST.cpp b/shared/cplusplus/AST.cpp index d112f9ab53..11be99ea48 100644 --- a/shared/cplusplus/AST.cpp +++ b/shared/cplusplus/AST.cpp @@ -3898,6 +3898,8 @@ void IdentifierListAST::accept0(ASTVisitor *visitor) unsigned ObjCClassDeclarationAST::firstToken() const { + if (attributes) + return attributes->firstToken(); return class_token; } @@ -3911,12 +3913,19 @@ unsigned ObjCClassDeclarationAST::lastToken() const return it->identifier_token + 1; } + for (SpecifierAST *it = attributes; it; it = it->next) { + if (! it->next) + return it->lastToken(); + } + return class_token + 1; } ObjCClassDeclarationAST *ObjCClassDeclarationAST::clone(MemoryPool *pool) const { ObjCClassDeclarationAST *ast = new (pool) ObjCClassDeclarationAST; + if (attributes) + ast->attributes = attributes->clone(pool); ast->class_token = class_token; if (identifier_list) ast->identifier_list = identifier_list->clone(pool); @@ -3927,6 +3936,9 @@ ObjCClassDeclarationAST *ObjCClassDeclarationAST::clone(MemoryPool *pool) const void ObjCClassDeclarationAST::accept0(ASTVisitor *visitor) { if (visitor->visit(this)) { + for (SpecifierAST *it = attributes; it; it = it->next) { + accept(it, visitor); + } } } |