فهرست منبع

move toplevel files to src/compiler

Also make Globals not depend on Version
Simon Krajewski 8 سال پیش
والد
کامیت
0675cec4e1
6فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 0 3
      src/compiler/globals.ml
  2. 0 0
      src/compiler/json.ml
  3. 2 2
      src/compiler/main.ml
  4. 0 0
      src/compiler/path.ml
  5. 3 0
      src/compiler/server.ml
  6. 0 0
      src/compiler/sourcemaps.ml

+ 0 - 3
src/globals.ml → src/compiler/globals.ml

@@ -29,9 +29,6 @@ let macro_platform = ref Neko
 
 let is_windows = Sys.os_type = "Win32" || Sys.os_type = "Cygwin"
 
-let s_version =
-	Printf.sprintf "%d.%d.%d%s" version_major version_minor version_revision (match Version.version_extra with None -> "" | Some v -> " " ^ v)
-
 let platforms = [
 	Js;
 	Lua;

+ 0 - 0
src/json.ml → src/compiler/json.ml


+ 2 - 2
src/main.ml → src/compiler/main.ml

@@ -462,7 +462,7 @@ let rec process_params create pl =
 and init ctx =
 	let usage = Printf.sprintf
 		"Haxe Compiler %s - (C)2005-2017 Haxe Foundation\n Usage : haxe%s -main <class> [-swf|-js|-neko|-php|-cpp|-cppia|-as3|-cs|-java|-python|-hl|-lua] <output> [options]\n Options :"
-		Globals.s_version (if Sys.os_type = "Win32" then ".exe" else "")
+		s_version (if Sys.os_type = "Win32" then ".exe" else "")
 	in
 	let com = ctx.com in
 	let classes = ref [([],"Std")] in
@@ -732,7 +732,7 @@ try
 			assert false
 		),"<dir> : set current working directory");
 		("-version",Arg.Unit (fun() ->
-			message ctx Globals.s_version null_pos;
+			message ctx s_version null_pos;
 			did_something := true;
 		),": print version and exit");
 		("--help-defines", Arg.Unit (fun() ->

+ 0 - 0
src/path.ml → src/compiler/path.ml


+ 3 - 0
src/server.ml → src/compiler/server.ml

@@ -24,6 +24,9 @@ type context = {
 	mutable has_error : bool;
 }
 
+let s_version =
+	Printf.sprintf "%d.%d.%d%s" version_major version_minor version_revision (match Version.version_extra with None -> "" | Some v -> " " ^ v)
+
 let report_times print =
 	let tot = ref 0. in
 	Hashtbl.iter (fun _ t -> tot := !tot +. t.total) Common.htimers;

+ 0 - 0
src/sourcemaps.ml → src/compiler/sourcemaps.ml