finally generating yaml

This commit is contained in:
2025-08-31 12:52:03 +02:00
parent 71fa80acba
commit f1be675f10
4 changed files with 128 additions and 98 deletions

View File

@@ -605,7 +605,7 @@ module SExpr = struct
(just ")")
in
let x_list = (nd_of3
(just "(")
(padded (just "("))
(repeat expr
|> map (fun li ->
List.fold_right (fun x acc -> Cons(x,acc)) li Nil))
@@ -774,7 +774,9 @@ module SExprMacroExp = struct
[] -> li1 s, false, ctx
| hd :: tl ->
try
expand_macro r hd ctx, true, ctx
let o = expand_macro r hd ctx, true, ctx in
(* Format.printf "expanded: %s, with: %a\n%!" i SExpr.pp_t r; *)
o
with Macro_Doesnt_App ->
test tl ctx
end
@@ -832,9 +834,10 @@ module SExprMacroExp = struct
end
and eval_root_while ctx s = begin
let s, ch, ctx = eval ctx s in
if ch then
if ch then begin
(* Format.printf "%a\n%!" SExpr.pp_t s; *)
SExpr.aggr_flat_map eval_root_while ctx s
else
end else
s, ctx
end