Skip to content
This repository
Browse code

[debug] slicer: extending the opx printer

  • Loading branch information...
commit 5496529845ed4b25e73b6df5925a7c17baaad474 1 parent 2803b8d
authored

Showing 1 changed file with 26 additions and 2 deletions. Show diff stats Hide diff stats

  1. 28  qmlslicer/qmlSimpleSlicer.ml
28  qmlslicer/qmlSimpleSlicer.ml
@@ -146,9 +146,33 @@ let pp_server_ident f = function
146 146
       Format.fprintf f "`ident_tsc (%s, %a)" (Ident.to_string i) (pp_option
147 147
         QmlPrint.pp_base#tsc) tsc_opt
148 148
   | `undefined -> Format.pp_print_string f "undefined"
149  
-let pp_info f {ident; server_ident; client_ident; _} =
150  
-  Format.fprintf f "@[<v>{@[<v2>@ ident: %s@ server_ident: %a@ client_ident: %a@]@ }@]"
  149
+let pp_kind f = function
  150
+  | `expression -> Format.pp_print_string f "`expression"
  151
+  | `insert_server_value -> Format.pp_print_string f "`insert_server_value"
  152
+  | `alias -> Format.pp_print_string f "`alias"
  153
+let pp_value pp_a f = function
  154
+  | Local a -> Format.fprintf f "Local %a" pp_a a
  155
+  | External p -> Format.fprintf f "External %a" Package.pp p
  156
+let pp_info_ident f {ident; _} = Format.pp_print_string f (Ident.to_string ident)
  157
+let pp_privacy f = function
  158
+  | Published -> Format.pp_print_string f "Published"
  159
+  | Private -> Format.pp_print_string f "Private"
  160
+  | Visible -> Format.pp_print_string f "Visible"
  161
+let pp_info f {ident; server_ident; client_ident;
  162
+               publish_on_the_server; publish_on_the_client;
  163
+               on_the_server; on_the_client;
  164
+               calls_private; privacy;
  165
+               calls_server_bypass; calls_client_bypass; _} =
  166
+  Format.fprintf f "@[<v>{@[<v2>@ ident: %s@ server_ident: %a@ client_ident: %a\
  167
+                                @ publish_on_the_server: %B@ publish_on_the_client: %B\
  168
+                                @ on_the_server: %a@ on_the_client: %a\
  169
+                                @ calls_private: %a@ privacy: %a\
  170
+                                @ calls_server_bypass: %a@ calls_client_bypass: %a@]@ }@]"
151 171
     (Ident.to_string ident) pp_server_ident server_ident pp_server_ident client_ident
  172
+    publish_on_the_server publish_on_the_client
  173
+    (pp_option (pp_option pp_kind)) on_the_server (pp_option (pp_option pp_kind)) on_the_client
  174
+    (pp_option (pp_value pp_info_ident)) calls_private pp_privacy privacy
  175
+    (pp_option BslKey.pp) calls_server_bypass (pp_option BslKey.pp) calls_client_bypass
152 176
 
153 177
 module Information =
154 178
 struct

0 notes on commit 5496529

Please sign in to comment.
Something went wrong with that request. Please try again.