Permalink
Browse files

temporarily remove %(%) to avoid weaker typing

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14809 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information...
1 parent be3eca6 commit 9fa17c95a5575341a9dea716f5393f7e5b6e6e51 @gasche gasche committed May 12, 2014
Showing with 4 additions and 4 deletions.
  1. +4 −4 parsing/pprintast.ml
View
8 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

0 comments on commit 9fa17c9

Please sign in to comment.