X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2FxPath.ml;h=a825d84d5c875606c0b7e276e2b9983426950a1a;hb=73755ec720254766e4504ac72684be5e357b6939;hp=0e71cafaff01bca4f0a33cc45144d43ae6958618;hpb=c951f1d4b8f4264acb0b5910dc544ad3a6ceebab;p=tatoo.git diff --git a/src/xPath.ml b/src/xPath.ml index 0e71caf..a825d84 100644 --- a/src/xPath.ml +++ b/src/xPath.ml @@ -12,6 +12,11 @@ (* ../LICENSE. *) (* *) (***********************************************************************) + +(* + Time-stamp: +*) + module Ast = struct @@ -21,7 +26,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 +50,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 +124,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