diff options
Diffstat (limited to 'src/vyconf_tree.ml')
-rw-r--r-- | src/vyconf_tree.ml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vyconf_tree.ml b/src/vyconf_tree.ml index 08bb652..71a7272 100644 --- a/src/vyconf_tree.ml +++ b/src/vyconf_tree.ml @@ -48,6 +48,14 @@ let replace_child node child = let find_child node name = find_child_in_list node.children name +let rec extract_names children = + match children with + | [] -> [] + | c :: cs -> c.name :: extract_names cs + +let list_children node = + extract_names node.children + let rec insert_child default_data node path data = match path with | [] -> raise Empty_path |