Module Js_of_ocaml_toplevel_common.JsooTopPpx

One can add a ppx rewriter to a toplevel by registering it

  let init () =
    Compiler_libs.Ast_mapper.register "js_of_ocaml" (fun _ -> Ppx_js.mapper)

Helpers to embed PPX into the toplevel.

val preprocess_structure : Parsetree.structure -> Parsetree.structure
val preprocess_signature : Parsetree.signature -> Parsetree.signature
val preprocess_phrase : Parsetree.toplevel_phrase -> Parsetree.toplevel_phrase