summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Pouillard <np@nicolaspouillard.fr>2007-11-27 14:31:31 +0000
committerNicolas Pouillard <np@nicolaspouillard.fr>2007-11-27 14:31:31 +0000
commitbf56fe7082f3939dff563cf8e6de3dde006d4968 (patch)
treeb760a694d0b2fd91667ada8c94ca9755f7999cbf
parente3ade8ec81d0a87c21819832589251da7d7a5aa9 (diff)
[camlp4] Print a break after the unary minus (PR#4417).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8654 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--camlp4/Camlp4/Printers/OCaml.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/camlp4/Camlp4/Printers/OCaml.ml b/camlp4/Camlp4/Printers/OCaml.ml
index 7175ea869..db6393621 100644
--- a/camlp4/Camlp4/Printers/OCaml.ml
+++ b/camlp4/Camlp4/Printers/OCaml.ml
@@ -416,9 +416,10 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
pp f "(%a)" o#reset#expr e
| <:expr< - $x$ >> ->
- pp f "@[<2>-@,%a@]" o#expr x
+ (* If you want to remove the space take care of - !r *)
+ pp f "@[<2>-@ %a@]" o#dot_expr x
| <:expr< -. $x$ >> ->
- pp f "@[<2>-.@,%a@]" o#expr x
+ pp f "@[<2>-.@ %a@]" o#dot_expr x (* same note as above *)
| <:expr< [$_$ :: $_$] >> -> o#expr_list_cons False f e
| <:expr@_loc< $lid:n$ $x$ $y$ >> when is_infix n ->
pp f "@[<2>%a@ %s@ %a@]" o#apply_expr x n o#apply_expr y