ソースを参照

[lua] get rid of unnecessary ~after param in gen_block_element

Justin Donaldson 9 年 前
コミット
7c7067d711
1 ファイル変更7 行追加7 行削除
  1. 7 7
      src/generators/genlua.ml

+ 7 - 7
src/generators/genlua.ml

@@ -950,7 +950,7 @@ and gen_expr ?(local=true) ctx e = begin
 		gen_value ctx e1;
 		gen_value ctx e1;
 end;
 end;
 
 
-and gen_block_element ?(after=false) ctx e  =
+and gen_block_element ctx e  =
     ctx.iife_assign <- false;
     ctx.iife_assign <- false;
     begin match e.eexpr with
     begin match e.eexpr with
 	| TTypeExpr _ -> ()
 	| TTypeExpr _ -> ()
@@ -985,23 +985,23 @@ and gen_block_element ?(after=false) ctx e  =
 		semicolon ctx;
 		semicolon ctx;
 	| TConst _ | TLocal _ -> ()
 	| TConst _ | TLocal _ -> ()
 	| TBlock el ->
 	| TBlock el ->
-		List.iter (gen_block_element ~after ctx) el
+		List.iter (gen_block_element ctx) el
 	| TCall ({ eexpr = TLocal { v_name = "__feature__" } }, { eexpr = TConst (TString f) } :: eif :: eelse) ->
 	| TCall ({ eexpr = TLocal { v_name = "__feature__" } }, { eexpr = TConst (TString f) } :: eif :: eelse) ->
 		if has_feature ctx f then
 		if has_feature ctx f then
-			gen_block_element ~after ctx eif
+			gen_block_element ctx eif
 		else (match eelse with
 		else (match eelse with
 			| [] -> ()
 			| [] -> ()
-			| [e] -> gen_block_element ~after ctx e
+			| [e] -> gen_block_element ctx e
 			| _ -> assert false)
 			| _ -> assert false)
 	(* For plain lua table instantiations, just capture argument operations *)
 	(* For plain lua table instantiations, just capture argument operations *)
 	| TCall({ eexpr = TLocal { v_name = "__lua_table__" }} , el) ->
 	| TCall({ eexpr = TLocal { v_name = "__lua_table__" }} , el) ->
-		List.iter(fun x -> gen_block_element ctx ~after x) el
+		List.iter(fun x -> gen_block_element ctx x) el
 	(* make a no-op __define_feature__ expression possible *)
 	(* make a no-op __define_feature__ expression possible *)
 	| TCall({eexpr = TLocal ({v_name = "__define_feature__"})}, [_;e]) ->
 	| TCall({eexpr = TLocal ({v_name = "__define_feature__"})}, [_;e]) ->
-		gen_block_element ~after ctx e
+		gen_block_element ctx e
 	| TFunction _ -> ()
 	| TFunction _ -> ()
 	| TObjectDecl fl ->
 	| TObjectDecl fl ->
-		List.iter (fun (_,e) -> gen_block_element ~after ctx e) fl
+		List.iter (fun (_,e) -> gen_block_element ctx e) fl
 	| TVar (v,eo) ->
 	| TVar (v,eo) ->
 		newline ctx;
 		newline ctx;
 		gen_expr ctx e; (* these already generate semicolons*)
 		gen_expr ctx e; (* these already generate semicolons*)