summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parsing/pprintast.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/parsing/pprintast.ml b/parsing/pprintast.ml
index f28b4bc22..4b70b9a55 100644
--- a/parsing/pprintast.ml
+++ b/parsing/pprintast.ml
@@ -150,9 +150,9 @@ class printer ()= object(self:'self)
| xs ->
let rec loop f = function
| [x] -> fu f x
- | x::xs -> pp f "%a%(%)%a" fu x sep loop xs
+ | x::xs -> fu f x; pp f sep; loop f xs;
| _ -> assert false in begin
- pp f "%(%)%a%(%)" first loop xs last;
+ pp f first; loop f xs; pp f last;
end in
aux f xs
method option : 'a. ?first:space_formatter -> ?last:space_formatter ->
@@ -162,11 +162,11 @@ class printer ()= object(self:'self)
and last = match last with Some x -> x | None -> "" in
match a with
| None -> ()
- | Some x -> pp f "%(%)%a%(%)" first fu x last
+ | Some x -> pp f first; fu f x; pp f last;
method paren: 'a . ?first:space_formatter -> ?last:space_formatter ->
bool -> (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a -> unit =
fun ?(first="") ?(last="") b fu f x ->
- if b then pp f "(%(%)%a%(%))" first fu x last
+ if b then (pp f first; fu f x; pp f last)
else fu f x