mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-01-25 02:26:42 -05:00
small bugfix in CCSexpM.print
This commit is contained in:
parent
92510d2c70
commit
164d71380a
1 changed files with 2 additions and 4 deletions
|
|
@ -93,13 +93,11 @@ let rec print fmt t = match t with
|
|||
| `List [] -> Format.pp_print_string fmt "()"
|
||||
| `List [x] -> Format.fprintf fmt "@[<hov2>(%a)@]" print x
|
||||
| `List l ->
|
||||
Format.open_hovbox 2;
|
||||
Format.pp_print_char fmt '(';
|
||||
Format.fprintf fmt "@[<hov2>(";
|
||||
List.iteri
|
||||
(fun i t' -> (if i > 0 then Format.fprintf fmt "@ "; print fmt t'))
|
||||
l;
|
||||
Format.pp_print_char fmt ')';
|
||||
Format.close_box ()
|
||||
Format.fprintf fmt ")@]"
|
||||
|
||||
let rec print_noindent fmt t = match t with
|
||||
| `Atom s when _must_escape s -> Format.fprintf fmt "\"%s\"" (String.escaped s)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue