Refactor xpath parser and ast in a submodule.
[tatoo.git] / src / tree.ml
index 1cfc77a..71f9a98 100644 (file)
 (*                                                                     *)
 (***********************************************************************)
 
+(*
+  Time-stamp: <Last modified on 2013-02-05 13:56:52 CET by Kim Nguyễn>
+*)
+
 type node = {
   tag : QName.t;
   preorder : int;
@@ -61,10 +65,10 @@ struct
   }
 
   let print_node_ptr fmt n =
-    Format.fprintf fmt "%s"
-      (if n == nil then "<NIL>" else
-        if n == dummy then "<DUMMY>" else
-          "<NODE " ^  string_of_int n.preorder ^ ">")
+    Format.fprintf fmt "<%s>"
+      (if n == nil then "NIL" else
+        if n == dummy then "DUMMY" else
+          "NODE " ^  string_of_int n.preorder)
 
   let debug_node fmt node =
     Format.fprintf fmt "{ tag=%s; preorder=%i; data=%s; first_child=%a; next_sibling=%a; parent=%a }"