+ let includes = match includes with None -> <:expr< [] >> | Some xs -> xs in
+
+ <:str_item<
+ let ep = { Wrappi_types.ep_loc = $loc$;
+ ep_local = $local$;
+ ep_name = $str:name$;
+ ep_ftype = ($rtype$, $parameters$, []);
+ ep_code = $code$;
+ ep_includes = $includes$ } in
+ Wrappi_accumulator.add_entry_point ep
+ >>
+
+let add_typedef _loc name t =
+ let loc = expr_of_loc _loc _loc in
+
+ <:str_item<
+ let td = { Wrappi_types.td_loc = $loc$;
+ td_name = $str:name$;
+ td_type = $t$ } in
+ Wrappi_accumulator.add_typedef td
+ >>
+
+let add_enum _loc name identifiers =
+ let loc = expr_of_loc _loc _loc in
+
+ <:str_item<
+ let en = { Wrappi_types.en_loc = $loc$;
+ en_name = $str:name$;
+ en_identifiers = Array.of_list $identifiers$ } in
+ Wrappi_accumulator.add_enum en
+ >>
+
+let add_struct _loc name fields =
+ let loc = expr_of_loc _loc _loc in
+
+ let fields = List.map (
+ fun (name, t) -> <:expr< ($str:name$, $t$) >>
+ ) fields in
+ let fields = expr_of_list _loc fields in
+