summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/ASTClone.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/ASTClone.cpp
parent01ee7a95c9e19cbeee083363ba57e90c1ac4b20d (diff)
downloadqt-creator-a3d129527fbce3a4b52b68eddaf65de0b54cca0c.tar.gz
Added ObjC method prototypes to the AST.
Diffstat (limited to 'src/shared/cplusplus/ASTClone.cpp')
-rw-r--r--src/shared/cplusplus/ASTClone.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/shared/cplusplus/ASTClone.cpp b/src/shared/cplusplus/ASTClone.cpp
index 2a95a1c0f3..385958d47c 100644
--- a/src/shared/cplusplus/ASTClone.cpp
+++ b/src/shared/cplusplus/ASTClone.cpp
@@ -1390,4 +1390,33 @@ ObjCPropertyDeclarationAST *ObjCPropertyDeclarationAST::clone(MemoryPool *pool)
return ast;
}
+ObjCMessageArgumentDeclarationAST *ObjCMessageArgumentDeclarationAST::clone(MemoryPool *pool) const
+{
+ ObjCMessageArgumentDeclarationAST *ast = new (pool) ObjCMessageArgumentDeclarationAST;
+ ast->param_selector_token = param_selector_token;
+ ast->colon_token = colon_token;
+ if (type_name) ast->type_name = type_name->clone(pool);
+ if (attributes) ast->attributes = attributes->clone(pool);
+ ast->param_name_token = param_name_token;
+ return ast;
+}
+
+ObjCMessageArgumentDeclarationListAST *ObjCMessageArgumentDeclarationListAST::clone(MemoryPool *pool) const
+{
+ ObjCMessageArgumentDeclarationListAST *ast = new (pool) ObjCMessageArgumentDeclarationListAST;
+ if (argument_declaration) ast->argument_declaration = argument_declaration->clone(pool);
+ if (next) ast->next = next->clone(pool);
+ return ast;
+}
+
+ObjCMethodPrototypeAST *ObjCMethodPrototypeAST::clone(MemoryPool *pool) const
+{
+ ObjCMethodPrototypeAST *ast = new (pool) ObjCMethodPrototypeAST;
+ ast->method_type_token = method_type_token;
+ if (type_name) ast->type_name = type_name->clone(pool);
+ if (arguments) ast->arguments = arguments->clone(pool);
+ if (attributes) ast->attributes = attributes->clone(pool);
+ return ast;
+}
+
CPLUSPLUS_END_NAMESPACE