Browse Source

allow --no-output to affect --interp (closes #4053)

Simon Krajewski 10 years ago
parent
commit
82848eed3e
1 changed files with 7 additions and 8 deletions
  1. 7 8
      main.ml

+ 7 - 8
main.ml

@@ -1290,7 +1290,6 @@ try
 		("--interp", Arg.Unit (fun() ->
 			Common.define com Define.Interp;
 			set_platform Neko "";
-			no_output := true;
 			interp := true;
 		),": interpret the program using internal macro system");
 		("--macro", Arg.String (fun e ->
@@ -1531,13 +1530,13 @@ try
 		end;
 		(match com.platform with
 		| _ when !no_output ->
-			if !interp then begin
-				let ctx = Interp.create com (Typer.make_macro_api tctx Ast.null_pos) in
-				Interp.add_types ctx com.types (fun t -> ());
-				(match com.main with
-				| None -> ()
-				| Some e -> ignore(Interp.eval_expr ctx e));
-			end;
+			()
+		| _ when !interp ->
+			let ctx = Interp.create com (Typer.make_macro_api tctx Ast.null_pos) in
+			Interp.add_types ctx com.types (fun t -> ());
+			(match com.main with
+			| None -> ()
+			| Some e -> ignore(Interp.eval_expr ctx e));
 		| Cross ->
 			()
 		| Flash when Common.defined com Define.As3 ->