Coccinelle release 1.0.0-rc4
[bpt/coccinelle.git] / popl09 / pretty_print_popl.ml
index cf4b9ce..e76b8fc 100644 (file)
@@ -47,7 +47,10 @@ let print_around printer term = function
 let mcode fn = function
     (x, _, Ast.MINUS(_,_,_,plus_stream), pos) ->
       print_string "-"; fn x;
-      Pretty_print_cocci.print_anything ">>> " plus_stream
+      (match plus_stream with
+       Ast.NOREPLACEMENT -> ()
+      | Ast.REPLACEMENT(plus_stream,_) ->
+         Pretty_print_cocci.print_anything ">>> " plus_stream)
   | (x, _, Ast.CONTEXT(_,plus_streams), pos) ->
        print_around fn x plus_streams
   | (x, info, Ast.PLUS _, pos) -> fn x
@@ -64,7 +67,7 @@ and print_term = function
     Past.Atomic(term) -> Pretty_print_cocci.rule_elem "" term
   | Past.IfThen(test,thn,(_,_,_,aft)) ->
       print_term test; print_term thn;
-      mcode (function _ -> ()) ((),Ast.no_info,aft,Ast.NoMetaPos)
+      mcode (function _ -> ()) ((),Ast.no_info,aft,[])
   | Past.TExists((_,v),term) -> print_string "exists "; print_string v;
       print_string " ."; force_newline(); print_term term