X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Ftree.ml;h=525f8c79f541baf21ce8e2fdc1b49b2c1cb3cfe4;hb=c2c22bf0d75a390c2538b9fce44aae63c542119a;hp=d44755ec4e0d0faa4967c3783d91162f4aafcd51;hpb=af9d790ca62e678e8e70ab8d8fa7f804985a75e0;p=tatoo.git diff --git a/src/tree.ml b/src/tree.ml index d44755e..525f8c7 100644 --- a/src/tree.ml +++ b/src/tree.ml @@ -18,7 +18,8 @@ module NodeKind = struct type t = - Document | Element | Text | Comment | Attribute | ProcessingInstruction | Node + Document | Element | Text | Comment | Attribute + | ProcessingInstruction | Node let to_string = function @@ -107,5 +108,9 @@ sig (** [preorder t n] returns the pre-order position of [n] in [t]. [preodrder t (root t) == 0] and [preorder t nil < 0]. *) + + val by_preorder : t -> int -> node + (** [by_preorder t i] returns the node with preorder [i] + *) val print_node : Format.formatter -> node -> unit end