stage4/generate_c/generate_c.cc
changeset 920 4369ce5e687f
parent 918 e9bde0aa93ed
child 930 96f3928ebd96
equal deleted inserted replaced
919:8da635655f37 920:4369ce5e687f
  1212         s4o.print("\n");
  1212         s4o.print("\n");
  1213             
  1213             
  1214         /* (B.3) Generate private internal variables for SFC */
  1214         /* (B.3) Generate private internal variables for SFC */
  1215         sfcdecl = new generate_c_sfcdecl_c(&s4o, symbol, FB_FUNCTION_PARAM"->");
  1215         sfcdecl = new generate_c_sfcdecl_c(&s4o, symbol, FB_FUNCTION_PARAM"->");
  1216         sfcdecl->generate(symbol->fblock_body, generate_c_sfcdecl_c::sfcinit_sd);
  1216         sfcdecl->generate(symbol->fblock_body, generate_c_sfcdecl_c::sfcinit_sd);
  1217         delete sfcdecl;
       
  1218       
  1217       
  1219         s4o.indent_left();
  1218         s4o.indent_left();
  1220         s4o.print(s4o.indent_spaces + "}\n\n");
  1219         s4o.print(s4o.indent_spaces + "}\n\n");
  1221       }    
  1220 
  1222       
       
  1223       if (!print_declaration) {
       
  1224         /* (C) Function with FB body */
  1221         /* (C) Function with FB body */
  1225         /* (C.1) Step definitions */
  1222         /* (C.1) Step definitions */
  1226         sfcdecl = new generate_c_sfcdecl_c(&s4o, symbol, FB_FUNCTION_PARAM"->");
       
  1227         sfcdecl->generate(symbol->fblock_body, generate_c_sfcdecl_c::stepdef_sd);
  1223         sfcdecl->generate(symbol->fblock_body, generate_c_sfcdecl_c::stepdef_sd);
  1228       
  1224       
  1229         /* (C.2) Action definitions */
  1225         /* (C.2) Action definitions */
  1230         sfcdecl->generate(symbol->fblock_body, generate_c_sfcdecl_c::actiondef_sd);
  1226         sfcdecl->generate(symbol->fblock_body, generate_c_sfcdecl_c::actiondef_sd);
  1231         delete sfcdecl;
  1227         delete sfcdecl;