diff options
author | Daniil Baturin <daniil@baturin.org> | 2015-02-13 23:44:42 +0600 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2015-02-13 23:44:42 +0600 |
commit | 4598b50d4003f63e87decd7b39ef04b0186c81a5 (patch) | |
tree | 3819c217e0683135a4495ae1c98fa2628c75fd53 /src/vytree.ml | |
parent | d6be2bce0689b10f3964c277a939d198d0f4a2cb (diff) | |
download | vyconf-4598b50d4003f63e87decd7b39ef04b0186c81a5.tar.gz vyconf-4598b50d4003f63e87decd7b39ef04b0186c81a5.zip |
Bring *_of_node functions back.
Diffstat (limited to 'src/vytree.ml')
-rw-r--r-- | src/vytree.ml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vytree.ml b/src/vytree.ml index 71a7272..44a2a62 100644 --- a/src/vytree.ml +++ b/src/vytree.ml @@ -4,12 +4,18 @@ type 'a vyconf_tree = { children: 'a vyconf_tree list } +type 'a t = 'a vyconf_tree + exception Empty_path exception Duplicate_child exception Nonexistent_path let make name data = { name = name; data = data; children = [] } +let name_of_node node = node.name +let data_of_node node = node.data +let children_of_node node = node.children + let rec find_child_in_list children name = match children with | [] -> None |