about summary refs log tree commit diff
path: root/src/boot/util
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2010-09-15 16:10:08 -0700
committerGraydon Hoare <graydon@mozilla.com>2010-09-15 16:10:08 -0700
commit5c82cb42e797599036746461eddf2bec1685eaf3 (patch)
treef4a79464c688a7002c26620522d40b770bd63e04 /src/boot/util
parent3350b17c60eec98264c62c3e12893d5ca8e00e7d (diff)
downloadrust-5c82cb42e797599036746461eddf2bec1685eaf3.tar.gz
rust-5c82cb42e797599036746461eddf2bec1685eaf3.zip
Add Ast.ATOM_pexp and -pexp mode wherein pexps live beyond parsing, into later stages. Fixes to pexp pretty printer.
Diffstat (limited to 'src/boot/util')
-rw-r--r--src/boot/util/fmt.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/boot/util/fmt.ml b/src/boot/util/fmt.ml
index 650224ba42b..8fa4169574f 100644
--- a/src/boot/util/fmt.ml
+++ b/src/boot/util/fmt.ml
@@ -9,11 +9,12 @@ let fmt_str ff = fmt ff "%s"
 ;;
 
 let fmt_obox ff = Format.pp_open_box ff 4;;
-let fmt_obox_3 ff = Format.pp_open_box ff 3;;
+let fmt_obox_n ff n = Format.pp_open_box ff n;;
 let fmt_cbox ff = Format.pp_close_box ff ();;
 let fmt_obr ff = fmt ff "{";;
 let fmt_cbr ff = fmt ff "@\n}";;
 let fmt_cbb ff = (fmt_cbox ff; fmt_cbr ff);;
+let fmt_break ff = Format.pp_print_space ff ();;
 
 let fmt_bracketed
     (bra:string)
@@ -23,7 +24,9 @@ let fmt_bracketed
     (a:'a)
     : unit =
   fmt_str ff bra;
+  fmt_obox_n ff 0;
   inner ff a;
+  fmt_cbox ff;
   fmt_str ff ket
 ;;
 
@@ -37,7 +40,7 @@ let fmt_arr_sep
     begin
       fun i a ->
         if i <> 0
-        then fmt_str ff sep;
+        then (fmt_str ff sep; fmt_break ff);
         inner ff a
     end
     az