projects
/
SXSI
/
xpathcomp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch xpathcomp-succintbackend-refactor back to trunk
[SXSI/xpathcomp.git]
/
tree.ml
diff --git
a/tree.ml
b/tree.ml
index
6c3cc1b
..
2218c28
100644
(file)
--- 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 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 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
val parent : t -> t
val id : t -> int
val tag : t -> Tag.t
@@
-185,6
+188,7
@@
struct
let compare = (-) end)
end
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;
let get_string t (i:string_content) = Text.get_text t.doc i
open Tree
let node_of_t t = { doc= t;