From 336e1dc5fb596ff7ed84e3a405a1efd578ee4330 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 20 Jul 2009 11:46:59 +0200 Subject: Fixes for the ObjC AST. Now it should be complete. --- src/shared/cplusplus/ASTClone.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/shared/cplusplus/ASTClone.cpp') diff --git a/src/shared/cplusplus/ASTClone.cpp b/src/shared/cplusplus/ASTClone.cpp index 1e160ae274..3340a39f25 100644 --- a/src/shared/cplusplus/ASTClone.cpp +++ b/src/shared/cplusplus/ASTClone.cpp @@ -1246,6 +1246,7 @@ ObjCCategoryInterfaceDeclarationAST *ObjCCategoryInterfaceDeclarationAST::clone( ObjCCategoryInterfaceDeclarationAST *ast = new (pool) ObjCCategoryInterfaceDeclarationAST; // copy DeclarationAST // copy ObjCCategoryInterfaceDeclarationAST + if (attributes) ast->attributes = attributes->clone(pool); ast->interface_token = interface_token; ast->class_identifier_token = class_identifier_token; if (protocol_refs) ast->protocol_refs = protocol_refs->clone(pool); @@ -1420,6 +1421,22 @@ ObjCMethodPrototypeAST *ObjCMethodPrototypeAST::clone(MemoryPool *pool) const return ast; } +ObjCMethodDeclarationAST *ObjCMethodDeclarationAST::clone(MemoryPool *pool) const +{ + ObjCMethodDeclarationAST *ast = new (pool) ObjCMethodDeclarationAST; + if (method_prototype) ast->method_prototype = method_prototype->clone(pool); + ast->semicolon_token = semicolon_token; + return ast; +} + +ObjCMethodDefinitionAST *ObjCMethodDefinitionAST::clone(MemoryPool *pool) const +{ + ObjCMethodDefinitionAST *ast = new (pool) ObjCMethodDefinitionAST; + if (method_prototype) ast->method_prototype = method_prototype->clone(pool); + if (function_body) ast->function_body = function_body->clone(pool); + return ast; +} + ObjCClassImplementationAST *ObjCClassImplementationAST::clone(MemoryPool *pool) const { ObjCClassImplementationAST *ast = new (pool) ObjCClassImplementationAST; -- cgit v1.2.1