summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/ASTClone.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/cplusplus/ASTClone.cpp')
-rw-r--r--src/shared/cplusplus/ASTClone.cpp159
1 files changed, 159 insertions, 0 deletions
diff --git a/src/shared/cplusplus/ASTClone.cpp b/src/shared/cplusplus/ASTClone.cpp
index abc89510a5..1e160ae274 100644
--- a/src/shared/cplusplus/ASTClone.cpp
+++ b/src/shared/cplusplus/ASTClone.cpp
@@ -1235,6 +1235,8 @@ ObjCClassInterfaceDeclarationAST *ObjCClassInterfaceDeclarationAST::clone(Memory
ast->colon_token = colon_token;
ast->superclass_identifier_token = superclass_identifier_token;
if (protocol_refs) ast->protocol_refs = protocol_refs->clone(pool);
+ if (inst_vars_decl) ast->inst_vars_decl = inst_vars_decl->clone(pool);
+ if (member_declarations) ast->member_declarations = member_declarations->clone(pool);
ast->end_token = end_token;
return ast;
}
@@ -1250,6 +1252,7 @@ ObjCCategoryInterfaceDeclarationAST *ObjCCategoryInterfaceDeclarationAST::clone(
ast->lparen_token = lparen_token;
ast->category_identifier_token = category_identifier_token;
ast->rparen_token = rparen_token;
+ if (member_declarations) ast->member_declarations = member_declarations->clone(pool);
ast->end_token = end_token;
return ast;
}
@@ -1271,6 +1274,7 @@ ObjCProtocolDefinitionAST *ObjCProtocolDefinitionAST::clone(MemoryPool *pool) co
ast->protocol_token = protocol_token;
ast->identifier_token = identifier_token;
if (protocol_refs) ast->protocol_refs = protocol_refs->clone(pool);
+ if (member_declarations) ast->member_declarations = member_declarations->clone(pool);
ast->end_token = end_token;
return ast;
}
@@ -1339,4 +1343,159 @@ ObjCEncodeExpressionAST *ObjCEncodeExpressionAST::clone(MemoryPool *pool) const
return ast;
}
+ObjCInstanceVariablesDeclarationAST *ObjCInstanceVariablesDeclarationAST::clone(MemoryPool *pool) const
+{
+ ObjCInstanceVariablesDeclarationAST *ast = new (pool) ObjCInstanceVariablesDeclarationAST;
+ ast->lbrace_token = lbrace_token;
+ if (instance_variables) ast->instance_variables = instance_variables->clone(pool);
+ if (member_declarations) ast->member_declarations = member_declarations->clone(pool);
+ ast->rbrace_token = rbrace_token;
+ return ast;
+}
+
+ObjCVisibilityDeclarationAST *ObjCVisibilityDeclarationAST::clone(MemoryPool *pool) const
+{
+ ObjCVisibilityDeclarationAST *ast = new (pool) ObjCVisibilityDeclarationAST;
+ ast->visibility_token = visibility_token;
+ return ast;
+}
+
+ObjcPropertyAttributeAST *ObjcPropertyAttributeAST::clone(MemoryPool *pool) const
+{
+ ObjcPropertyAttributeAST *ast = new (pool) ObjcPropertyAttributeAST;
+ ast->attribute_identifier_token = attribute_identifier_token;
+ ast->equals_token = equals_token;
+ ast->method_selector_identifier_token = method_selector_identifier_token;
+ ast->colon_token = colon_token;
+ return ast;
+}
+
+ObjcPropertyAttributeListAST *ObjcPropertyAttributeListAST::clone(MemoryPool *pool) const
+{
+ ObjcPropertyAttributeListAST *ast = new (pool) ObjcPropertyAttributeListAST;
+ if (attr) ast->attr = attr->clone(pool);
+ ast->comma_token = comma_token;
+ if (next) ast->next = next->clone(pool);
+ return ast;
+}
+
+ObjCPropertyDeclarationAST *ObjCPropertyDeclarationAST::clone(MemoryPool *pool) const
+{
+ ObjCPropertyDeclarationAST *ast = new (pool) ObjCPropertyDeclarationAST;
+ if (attributes) ast->attributes = attributes->clone(pool);
+ ast->property_token = property_token;
+ ast->lparen_token = lparen_token;
+ if (property_attributes) ast->property_attributes = property_attributes->clone(pool);
+ ast->rparen_token = rparen_token;
+ if (simple_declaration) ast->simple_declaration = simple_declaration->clone(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;
+}
+
+ObjCClassImplementationAST *ObjCClassImplementationAST::clone(MemoryPool *pool) const
+{
+ ObjCClassImplementationAST *ast = new (pool) ObjCClassImplementationAST;
+ ast->implementation_token = implementation_token;
+ ast->class_identifier = class_identifier;
+ ast->colon_token = colon_token;
+ ast->super_class_identifier = super_class_identifier;
+ if (inst_vars_decl) ast->inst_vars_decl = inst_vars_decl->clone(pool);
+ if (declarations) ast->declarations = declarations->clone(pool);
+ ast->end_token = end_token;
+ return ast;
+}
+
+ObjCCategoryImplementationAST *ObjCCategoryImplementationAST::clone(MemoryPool *pool) const
+{
+ ObjCCategoryImplementationAST *ast = new (pool) ObjCCategoryImplementationAST;
+ ast->implementation_token = implementation_token;
+ ast->class_identifier = class_identifier;
+ ast->lparen_token = lparen_token;
+ ast->category_name_token = category_name_token;
+ ast->rparen_token = rparen_token;
+ if (declarations) ast->declarations = declarations->clone(pool);
+ ast->end_token = end_token;
+ return ast;
+}
+
+ObjCSynthesizedPropertyAST *ObjCSynthesizedPropertyAST::clone(MemoryPool *pool) const
+{
+ ObjCSynthesizedPropertyAST *ast = new (pool) ObjCSynthesizedPropertyAST;
+ ast->property_identifier = property_identifier;
+ ast->equals_token = equals_token;
+ ast->property_alias_identifier = property_alias_identifier;
+ return ast;
+}
+
+ObjCSynthesizedPropertyListAST *ObjCSynthesizedPropertyListAST::clone(MemoryPool *pool) const
+{
+ ObjCSynthesizedPropertyListAST *ast = new (pool) ObjCSynthesizedPropertyListAST;
+ if (synthesized_property) ast->synthesized_property = synthesized_property->clone(pool);
+ ast->comma_token = comma_token;
+ if (next) ast->next = next->clone(pool);
+ return ast;
+}
+
+ObjCSynthesizedPropertiesDeclarationAST *ObjCSynthesizedPropertiesDeclarationAST::clone(MemoryPool *pool) const
+{
+ ObjCSynthesizedPropertiesDeclarationAST *ast = new (pool) ObjCSynthesizedPropertiesDeclarationAST;
+ ast->synthesized_token = synthesized_token;
+ if (property_identifiers) ast->property_identifiers = property_identifiers->clone(pool);
+ ast->semicolon_token = semicolon_token;
+ return ast;
+}
+
+ObjCDynamicPropertiesDeclarationAST *ObjCDynamicPropertiesDeclarationAST::clone(MemoryPool *pool) const
+{
+ ObjCDynamicPropertiesDeclarationAST *ast = new (pool) ObjCDynamicPropertiesDeclarationAST;
+ ast->dynamic_token = dynamic_token;
+ if (property_identifiers) ast->property_identifiers = property_identifiers->clone(pool);
+ ast->semicolon_token = semicolon_token;
+ return ast;
+}
+
+ObjCFastEnumerationAST *ObjCFastEnumerationAST::clone(MemoryPool *pool) const
+{
+ ObjCFastEnumerationAST *ast = new (pool) ObjCFastEnumerationAST;
+ ast->for_token = for_token;
+ ast->lparen_token = lparen_token;
+ if (initializer)
+ ast->initializer = initializer->clone(pool);
+ ast->in_token = in_token;
+ if (fast_enumeratable_expression)
+ ast->fast_enumeratable_expression = fast_enumeratable_expression->clone(pool);
+ ast->rparen_token = rparen_token;
+ if (body_statement)
+ ast->body_statement = body_statement->clone(pool);
+ return ast;
+}
+
CPLUSPLUS_END_NAMESPACE