let lift_expr = M.Expr.meta_expr
(* Handle a top level statement. *)
-let rec call_stmt name pre post (_loc, stmt, sh) =
+let rec call_stmt ?name ?pre ?post (_loc, stmt, sh) =
let name =
match name with
| None -> let name = unique_job_name () in <:expr< $str:name$ >>
(* "str_item" is a top level statement in an OCaml program. *)
str_item: LEVEL "top" [
- [ s = statement -> call_stmt None None None s ]
+ [ s = statement -> call_stmt s ]
| [ "job"; name = expr;
pre = OPT pre;
post = OPT post;
s = statement ->
- call_stmt (Some name) pre post s ]
+ call_stmt ~name ?pre ?post s ]
];
END