this repo has no description

Phase 2: Wire up PPX preprocessing in execute

The JsooTopPpx module was set up to capture PPX registrations and apply
rewriters, but the preprocess_phrase function was never called during
execution. This commit:

- Adds JsooTopPpx.preprocess_phrase call before Toploop.execute_phrase
- Removes debug output from preprocess_structure

This enables PPX rewriters (including Ppx_js for [%js] syntax) to work
properly in the toplevel.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+1 -1
+1 -1
lib/impl.ml
··· 81 82 let preprocess_structure str = 83 let open Ast_mapper in 84 - Printf.eprintf "Rewriting...\n%!"; 85 List.fold_right !ppx_rewriters ~init:str ~f:(fun ppx_rewriter str -> 86 let mapper = ppx_rewriter [] in 87 mapper.structure mapper str) ··· 223 while true do 224 try 225 let phr = !Toploop.parse_toplevel_phrase lb in 226 ignore (Toploop.execute_phrase printval pp_answer phr : bool) 227 with 228 | End_of_file -> raise End_of_file
··· 81 82 let preprocess_structure str = 83 let open Ast_mapper in 84 List.fold_right !ppx_rewriters ~init:str ~f:(fun ppx_rewriter str -> 85 let mapper = ppx_rewriter [] in 86 mapper.structure mapper str) ··· 222 while true do 223 try 224 let phr = !Toploop.parse_toplevel_phrase lb in 225 + let phr = JsooTopPpx.preprocess_phrase phr in 226 ignore (Toploop.execute_phrase printval pp_answer phr : bool) 227 with 228 | End_of_file -> raise End_of_file