finish splitting modules, and start using ninja

This commit is contained in:
2025-09-03 15:21:13 +02:00
parent afd552bd09
commit 87e845cee5
10 changed files with 670 additions and 494 deletions

24
main.ml Normal file
View File

@@ -0,0 +1,24 @@
let read_all_stdin () =
let buf = Buffer.create 4096 in
try
while true do
let line = input_line stdin in
Buffer.add_string buf line;
Buffer.add_char buf '\n';
done;
Buffer.contents buf
with End_of_file ->
Buffer.contents buf
let () =
let src = read_all_stdin () in
let v = Sexpr_macro.sparse src in
let v = Sexpr_macro.do_eval v in
Format.printf "; number of macro expansions: %d\n%!" !Sexpr_macro.num_expands;
Format.set_margin 40;
Format.printf "%a@.@?" Sexpr.pp_t v;
exit 0