let () =
(* Quotation expander for C code. *)
let c_quotation_expander _loc _ code =
+ let loc = expr_of_loc _loc _loc in
+
(* XXX Expand %- or $- expressions in code. *)
(* XXX Escape >> in code. *)
- ExStr (_loc, code)
+
+ <:expr< { Wrappi_types.cc_loc = $loc$;
+ cc_code = $str:code$ } >>
in
Quotation.add "c" Quotation.DynAst.expr_tag c_quotation_expander;
(* A return type. *)
rtype: [
[ "void" -> <:expr< Wrappi_types.RVoid >> ]
+ | [ "static_string" -> <:expr< Wrappi_types.RStaticString >> ]
| [ t = ptype -> <:expr< Wrappi_types.Return $t$ >> ]
];