summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/ASTVisit.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2009-07-16 17:38:24 +0200
committerErik Verbruggen <erik.verbruggen@nokia.com>2009-07-16 17:38:24 +0200
commita3d129527fbce3a4b52b68eddaf65de0b54cca0c (patch)
tree228a3831573edbb65e8ca0f68cd764fd011ebf65 /src/shared/cplusplus/ASTVisit.cpp
parent01ee7a95c9e19cbeee083363ba57e90c1ac4b20d (diff)
downloadqt-creator-a3d129527fbce3a4b52b68eddaf65de0b54cca0c.tar.gz
Added ObjC method prototypes to the AST.
Diffstat (limited to 'src/shared/cplusplus/ASTVisit.cpp')
-rw-r--r--src/shared/cplusplus/ASTVisit.cpp45
1 files changed, 41 insertions, 4 deletions
diff --git a/src/shared/cplusplus/ASTVisit.cpp b/src/shared/cplusplus/ASTVisit.cpp
index d5238f52a6..b6b21ad357 100644
--- a/src/shared/cplusplus/ASTVisit.cpp
+++ b/src/shared/cplusplus/ASTVisit.cpp
@@ -1309,8 +1309,6 @@ void ObjcPropertyAttributeListAST::accept0(ASTVisitor *visitor)
// visit ObjcPropertyAttributeListAST
if (attr)
accept(attr, visitor);
- if (next)
- accept(next, visitor);
// visit AST
}
visitor->endVisit(this);
@@ -1320,8 +1318,8 @@ void ObjCPropertyDeclarationAST::accept0(ASTVisitor *visitor)
{
if (visitor->visit(this)) {
// visit ObjCPropertyDeclarationAST:
- if (property_attributes)
- accept(property_attributes, visitor);
+ for (ObjcPropertyAttributeListAST *it = property_attributes; it; it = it->next)
+ accept(it, visitor);
if (simple_declaration)
accept(simple_declaration, visitor);
// visit DeclarationAST:
@@ -1329,4 +1327,43 @@ void ObjCPropertyDeclarationAST::accept0(ASTVisitor *visitor)
visitor->endVisit(this);
}
+void ObjCMessageArgumentDeclarationAST::accept0(ASTVisitor *visitor)
+{
+ if (visitor->visit(this)) {
+ // visit ObjCMessageArgumentDeclarationAST
+ if (type_name)
+ accept(type_name, visitor);
+ if (attributes)
+ accept(attributes, visitor);
+ // visit AST
+ }
+ visitor->endVisit(this);
+}
+
+void ObjCMessageArgumentDeclarationListAST::accept0(ASTVisitor *visitor)
+{
+ if (visitor->visit(this)) {
+ // visit ObjCMessageArgumentDeclarationListAST
+ if (argument_declaration)
+ accept(argument_declaration, visitor);
+ // visit AST
+ }
+ visitor->endVisit(this);
+}
+
+void ObjCMethodPrototypeAST::accept0(ASTVisitor *visitor)
+{
+ if (visitor->visit(this)) {
+ // visit ObjCMethodPrototypeAST
+ if (type_name)
+ accept(type_name, visitor);
+ for (ObjCMessageArgumentDeclarationListAST *it = arguments; it; it = it->next)
+ accept(it, visitor);
+ if (attributes)
+ accept(attributes, visitor);
+ // visit AST
+ }
+ visitor->endVisit(this);
+}
+
CPLUSPLUS_END_NAMESPACE