X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2FxPath.ml;h=aab642282749c6d9294a08a40d1028df1a2d78e6;hp=0e71cafaff01bca4f0a33cc45144d43ae6958618;hb=ddd758716b1cd691c8748d2e86c179e803b1d3af;hpb=c951f1d4b8f4264acb0b5910dc544ad3a6ceebab diff --git a/src/xPath.ml b/src/xPath.ml index 0e71caf..aab6422 100644 --- a/src/xPath.ml +++ b/src/xPath.ml @@ -21,7 +21,7 @@ struct and axis = Self | Attribute | Child | Descendant | DescendantOrSelf | FollowingSibling | Parent | Ancestor | AncestorOrSelf | PrecedingSibling | Preceding | Following - and test = Simple of QNameSet.t + and test = QNameSet.t and binop = Eq | Neq | Lt | Gt | Lte | Gte | Or | And | Add | Sub | Mult | Div | Mod and unop = Neg @@ -45,9 +45,6 @@ struct QName.document; QName.cdata_section; QName.comment]) - let t_text = Simple text - let t_node = Simple node - let t_star = Simple star @@ -122,15 +119,14 @@ struct and print_test fmt ts = try pp fmt "%s" (List.assoc ts - [ t_text,"text()"; - t_node,"node()"; - t_star, "*" ] ) + [ text,"text()"; + node,"node()"; + star, "*" ] ) with Not_found -> pp fmt "%s" - (match ts with - Simple t -> if QNameSet.is_finite t - then QName.to_string (QNameSet.choose t) - else "" + (if QNameSet.is_finite ts + then QName.to_string (QNameSet.choose ts) + else "" ) and print_expr fmt = function