Commit 6561585d authored by Pietro Abate's avatar Pietro Abate

Minor refactoring

parent b59a4797
......@@ -80,20 +80,10 @@ let print_node ppf n =
to_print := n :: !to_print;
dump_print ppf
let print_lst f ppf l =
let rec aux ppf = function
|[] -> Format.fprintf ppf "@."
|[h] -> Format.fprintf ppf "%a" f h
|h::t -> Format.fprintf ppf "%a,%a" f h aux t
in
match l with
|[] -> Format.fprintf ppf ""
|_ -> Format.fprintf ppf "%a" aux l
let pp_v ppf (id, name) =
Format.fprintf ppf "(%d,%s)" (Upool.int id) (Encodings.Utf8.to_string name)
let pp_fv ppf fv = print_lst pp_v ppf fv
let pp_fv ppf fv = Utils.pp_list ~delim:("","") pp_v ppf fv
let pp_node ppf node =
Format.fprintf ppf "id:%d; descr:[%a]; accept:[id:%d; descr:%a]; fv:[%a]"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment