stage4/generate_c/generate_c_vardecl.cc
changeset 152 efc510145ab2
parent 146 eef5e62048c7
child 160 59d58f5e6caa
equal deleted inserted replaced
151:3b898fb11e73 152:efc510145ab2
  1058         symbol->variable_name->accept(*this);
  1058         symbol->variable_name->accept(*this);
  1059       else
  1059       else
  1060         symbol->location->accept(*this);
  1060         symbol->location->accept(*this);
  1061       s4o.print(" = ");
  1061       s4o.print(" = ");
  1062       symbol->location->accept(*this);
  1062       symbol->location->accept(*this);
       
  1063       if (this->current_var_init_symbol != NULL) {
       
  1064         s4o.print("; *");
       
  1065         print_variable_prefix();
       
  1066         if (symbol->variable_name != NULL)
       
  1067           symbol->variable_name->accept(*this);
       
  1068         else
       
  1069           symbol->location->accept(*this);
       
  1070         s4o.print(" = ");
       
  1071         this->current_var_init_symbol->accept(*this);
       
  1072       }
  1063       s4o.print(";}");
  1073       s4o.print(";}");
  1064       break;
  1074       break;
  1065 
  1075 
  1066     case globalinit_vf:
  1076     case globalinit_vf:
  1067       s4o.print(s4o.indent_spaces + "__plc_pt_c<");
  1077       s4o.print(s4o.indent_spaces + "__plc_pt_c<");