X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2Ftree.ml;h=9e6c71ca61a4a0dd8a3ba8d6c088810e2d5916cb;hp=525f8c79f541baf21ce8e2fdc1b49b2c1cb3cfe4;hb=1947a98f419c2bf50378fed783406818b010c60e;hpb=57fd66649f11c7f513d389d3ee5c02cc24bc51c7 diff --git a/src/tree.ml b/src/tree.ml index 525f8c7..9e6c71c 100644 --- a/src/tree.ml +++ b/src/tree.ml @@ -113,4 +113,15 @@ sig (** [by_preorder t i] returns the node with preorder [i] *) val print_node : Format.formatter -> node -> unit + + val is_first_child : t -> node -> bool + val is_next_sibling : t -> node -> bool + val prev_sibling : t -> node -> node + (** [prev_sibling t n] returns the previous_sibling of node [n] in tree [t]. + Returns [nil] if [n] is the first child of a node. + *) + val parent_of_first : t -> node -> node + (** [parent_of_first t n] returns the parent of node [n] in tree [t] . + Returns [nil] if [n] isn't the first child of a node. + *) end