X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=tree.ml;h=2218c2843f913208ce5e758fd99ccf266b82fd82;hb=8dbe70986b1229d003298d945992852fb27c7aee;hp=6c3cc1bf483f0a650010a1524a75269c2263562e;hpb=7dea5fd8bedede27d4d601f85630a249bfab420b;p=SXSI%2Fxpathcomp.git diff --git a/tree.ml b/tree.ml index 6c3cc1b..2218c28 100644 --- a/tree.ml +++ b/tree.ml @@ -18,8 +18,11 @@ sig val tag_pool : t -> Tag.pool val string : t -> string val descr : t -> descr + val is_node : t -> bool val left : t -> t val right : t -> t + val first_child : t -> t + val next_sibling : t -> t val parent : t -> t val id : t -> int val tag : t -> Tag.t @@ -185,6 +188,7 @@ struct let compare = (-) end) end + let is_node = function { node=Node(_) } -> true | _ -> false let get_string t (i:string_content) = Text.get_text t.doc i open Tree let node_of_t t = { doc= t;