소스 검색

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

Simon Krajewski 11 년 전
부모
커밋
71f765d521
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  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 ->