stage3/narrow_candidate_datatypes.cc
changeset 798 d21e598b0b75
parent 797 3444c331efc9
child 802 cac262d1d6a5
child 806 f218434eeaf8
equal deleted inserted replaced
797:3444c331efc9 798:d21e598b0b75
   714 /************************************/
   714 /************************************/
   715 /*********************/
   715 /*********************/
   716 /* B 1.5.1 Functions */
   716 /* B 1.5.1 Functions */
   717 /*********************/
   717 /*********************/
   718 void *narrow_candidate_datatypes_c::visit(function_declaration_c *symbol) {
   718 void *narrow_candidate_datatypes_c::visit(function_declaration_c *symbol) {
       
   719 	/* set the function_declaration_c->datatype to the datatype returned by the function! */
       
   720 	symbol->type_name->datatype = search_base_type_c::get_basetype_decl(symbol->type_name);
       
   721 	symbol->datatype = symbol->type_name->datatype;
       
   722 	
   719 	search_varfb_instance_type = new search_varfb_instance_type_c(symbol);
   723 	search_varfb_instance_type = new search_varfb_instance_type_c(symbol);
   720 	symbol->var_declarations_list->accept(*this);
   724 	symbol->var_declarations_list->accept(*this);
   721 	if (debug) printf("Narrowing candidate data types list in body of function %s\n", ((token_c *)(symbol->derived_function_name))->value);
   725 	if (debug) printf("Narrowing candidate data types list in body of function %s\n", ((token_c *)(symbol->derived_function_name))->value);
   722 	symbol->function_body->accept(*this);
   726 	symbol->function_body->accept(*this);
   723 	delete search_varfb_instance_type;
   727 	delete search_varfb_instance_type;