stage4/generate_c/generate_c_st.cc
changeset 410 c6486bd97392
parent 406 6381589697ff
child 411 3e21d98d0a71
equal deleted inserted replaced
409:8d876ad522f4 410:c6486bd97392
   310 /*************************************/
   310 /*************************************/
   311 
   311 
   312 // SYM_REF2(structured_variable_c, record_variable, field_selector)
   312 // SYM_REF2(structured_variable_c, record_variable, field_selector)
   313 void *visit(structured_variable_c *symbol) {
   313 void *visit(structured_variable_c *symbol) {
   314   TRACE("structured_variable_c");
   314   TRACE("structured_variable_c");
       
   315   unsigned int vartype = search_varfb_instance_type->get_vartype(symbol->record_variable);
       
   316   bool type_is_complex = search_varfb_instance_type->type_is_complex();
   315   switch (wanted_variablegeneration) {
   317   switch (wanted_variablegeneration) {
   316     case complextype_base_vg:
   318     case complextype_base_vg:
   317     case complextype_base_assignment_vg:
   319     case complextype_base_assignment_vg:
   318       symbol->record_variable->accept(*this);
   320       symbol->record_variable->accept(*this);
       
   321       if (!type_is_complex) {
       
   322     	s4o.print(".");
       
   323     	symbol->field_selector->accept(*this);
       
   324       }
   319       break;
   325       break;
   320     case complextype_suffix_vg:
   326     case complextype_suffix_vg:
   321     case assignment_vg:
   327     case assignment_vg:
   322       symbol->record_variable->accept(*this);
   328       symbol->record_variable->accept(*this);
   323       s4o.print(".");
   329       if (type_is_complex) {
   324       symbol->field_selector->accept(*this);
   330         s4o.print(".");
       
   331         symbol->field_selector->accept(*this);
       
   332       }
   325       break;
   333       break;
   326     default:
   334     default:
   327       if (this->is_variable_prefix_null()) {
   335       if (this->is_variable_prefix_null()) {
   328     	symbol->record_variable->accept(*this);
   336     	symbol->record_variable->accept(*this);
   329     	s4o.print(".");
   337     	s4o.print(".");