toplevel emits round trip pprint of ast to console.
This commit is contained in:
18
toplevel.ml
18
toplevel.ml
@ -28,9 +28,25 @@ module Graphics_support = struct
|
||||
let init elt = Graphics_js.open_canvas elt
|
||||
end
|
||||
|
||||
open Log_js
|
||||
|
||||
module Ppx_support = struct
|
||||
let init () =
|
||||
Ast_mapper.register "js_of_ocaml" (fun _ -> Ppx_js.mapper)
|
||||
Ppx_graph.init ();
|
||||
Ast_mapper.register "js_of_ocaml" (fun _ -> Ppx_js.mapper);
|
||||
Ast_mapper.register "ppxlib" (fun _ ->
|
||||
Log.info (fun m -> m "Ppxlib.mapper");
|
||||
{
|
||||
Ast_mapper.default_mapper with
|
||||
structure =
|
||||
(fun _ ->
|
||||
Log.info (fun m -> m "Ppxlib.Driver.map_structure");
|
||||
Ppxlib.Driver.map_structure);
|
||||
signature =
|
||||
(fun _ ->
|
||||
Log.info (fun m -> m "Ppxlib.Driver.map_signature");
|
||||
Ppxlib.Driver.map_signature);
|
||||
})
|
||||
end
|
||||
|
||||
module Colorize = struct
|
||||
|
||||
Reference in New Issue
Block a user