Explorar o código

[cs] added main class to build output

Caue Waneck %!s(int64=13) %!d(string=hai) anos
pai
achega
75c588a987
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      gencommon.ml

+ 10 - 0
gencommon.ml

@@ -949,6 +949,16 @@ let dump_descriptor gen name path_s =
   SourceWriter.write w "end modules";
   SourceWriter.newline w;
   (* dump all resources *)
+  (match gen.gcon.main_class with
+    | Some path -> 
+      SourceWriter.write w "begin main";
+      SourceWriter.newline w;
+      SourceWriter.write w (path_s path);
+      SourceWriter.newline w;
+      SourceWriter.write w "end main";
+      SourceWriter.newline w
+	| _ -> ()
+  );
   SourceWriter.write w "begin resources";
   SourceWriter.newline w;
   Hashtbl.iter (fun name _ ->