Explorar o código

[As3] generate comment into main class to compile __main__.as instead

Simon Krajewski %!s(int64=11) %!d(string=hai) anos
pai
achega
71f765d521
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      genas3.ml

+ 6 - 0
genas3.ml

@@ -167,6 +167,12 @@ let init infos path =
 	}
 
 let close ctx =
+	begin match ctx.inf.com.main_class with
+		| Some tp when tp = ctx.curclass.cl_path ->
+			output_string ctx.ch "// Compile __main__.as instead\n";
+		| _ ->
+			()
+	end;
 	output_string ctx.ch (Printf.sprintf "package %s {\n" (String.concat "." (fst ctx.path)));
 	Hashtbl.iter (fun name paths ->
 		List.iter (fun pack ->