X-Git-Url: http://git.annexia.org/?p=whenjobs.git;a=blobdiff_plain;f=lib%2Fwhenfile.mli;h=54ee52d954bcc81d21660112a3355eddbcfdacb7;hp=b754cbccd2aabc683557acdcb636d3c7107d2156;hb=5c7aa66dbdb32b4fc11d0f72a4cc028c7bfb1b55;hpb=76e68068f22a67c788f14a7c9404db7f7514da49 diff --git a/lib/whenfile.mli b/lib/whenfile.mli index b754cbc..54ee52d 100644 --- a/lib/whenfile.mli +++ b/lib/whenfile.mli @@ -18,12 +18,12 @@ (** This module is used when compiling whenjobs input files. *) -val init : unit -> unit -(** "Initialize" the module. Clear the list of jobs and other - internal variables so we are ready to parse a new file. *) +val init : Whenstate.t -> unit +(** "Initialize" the module. Pass in the initial state, ready for + parsing a new file. *) -val get_jobs : unit -> Whenexpr.job list -(** Get the jobs added since {!init} was called. *) +val get_state : unit -> Whenstate.t +(** Return the updated state. Call this after parsing the file. *) val add_when_job : Camlp4.PreCast.Loc.t -> string -> Camlp4.PreCast.Ast.expr -> Whenexpr.shell_script -> unit (** When a 'when' macro appears as a toplevel statement in an