Nicolas Cannasse hace 18 años
padre
commit
723c2ff95e
Se han modificado 2 ficheros con 12 adiciones y 0 borrados
  1. 1 0
      doc/CHANGES.txt
  2. 11 0
      main.ml

+ 1 - 0
doc/CHANGES.txt

@@ -4,6 +4,7 @@
 	prevent some exceptions in neko.net.ProxyDetect
 	prevent some exceptions in neko.net.ProxyDetect
 	fixed ByteArray serialization
 	fixed ByteArray serialization
 	added neko.Int32
 	added neko.Int32
+	added -x for fast neko scripting
 
 
 2007-01-28: 1.11
 2007-01-28: 1.11
 	changed StringBuf.add implementation
 	changed StringBuf.add implementation

+ 11 - 0
main.ml

@@ -201,6 +201,17 @@ try
 			Typer.forbidden_packages := ["js"; "flash"];
 			Typer.forbidden_packages := ["js"; "flash"];
 			target := Neko file
 			target := Neko file
 		),"<file> : compile code to Neko Binary");
 		),"<file> : compile code to Neko Binary");
+		("-x", Arg.String (fun file ->
+			check_targets();
+			Typer.forbidden_packages := ["js"; "flash"];
+			target := Neko file;
+			if !main_class = None then begin
+				let cpath = make_path file in
+				main_class := Some cpath;
+				classes := cpath :: !classes
+			end;
+			cmds := ("neko " ^ file) :: !cmds;
+		),"<file> : shortcut for compiling and executing a neko file");
 		("-xml",Arg.String (fun file ->
 		("-xml",Arg.String (fun file ->
 			Parser.use_doc := true;
 			Parser.use_doc := true;
 			xml_out := Some file
 			xml_out := Some file