diff options
| author | Gabriel Kerneis | 2014-05-20 15:03:20 +0100 |
|---|---|---|
| committer | Gabriel Kerneis | 2014-05-20 15:03:34 +0100 |
| commit | 1c5d405883febc79ea3958a989221dad2e491d27 (patch) | |
| tree | d6bebd90e9b2a571649928e7f53f0094f3c02463 /src/pretty_print.ml | |
| parent | f45a2717796f2c416e857f6db25c242b701e4dba (diff) | |
| parent | 8cd3f794d59170d519f5000cc13f6a3c9cde849c (diff) | |
Merge new pretty-printer
Diffstat (limited to 'src/pretty_print.ml')
| -rw-r--r-- | src/pretty_print.ml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pretty_print.ml b/src/pretty_print.ml index 75075c69..9f0382f5 100644 --- a/src/pretty_print.ml +++ b/src/pretty_print.ml @@ -236,7 +236,7 @@ and pp_exp ppf (E_aux(e,(_,annot))) = fprintf ppf "@[<0> %a %a (%a %a %a %a %a %a %a %a)@ @[<1>%a@]@]" kwd "foreach " pp_id id kwd "from " pp_exp exp1 kwd " to " pp_exp exp2 kwd "by " pp_exp exp3 kwd "in" pp_ord order pp_exp exp4 | E_vector(exps) -> fprintf ppf "@[<0>%a%a%a@]" kwd "[" (list_pp pp_comma_exp pp_exp) exps kwd "]" - | E_vector_indexed(iexps) -> + | E_vector_indexed(iexps,default) -> let iformat ppf (i,e) = fprintf ppf "@[<1>%i%a %a%a@]" i kwd " = " pp_exp e kwd "," in let lformat ppf (i,e) = fprintf ppf "@[<1>%i%a %a@]" i kwd " = " pp_exp e in fprintf ppf "@[<0> %a%a%a@]" kwd "[" (list_pp iformat lformat) iexps kwd "]" @@ -671,7 +671,7 @@ and pp_lem_exp ppf (E_aux(e,(l,annot))) = fprintf ppf "@[<0>(E_aux (%a %a %a %a %a %a @ @[<1> %a @]) (%a, %a))@]" kwd "E_for" pp_lem_id id pp_lem_exp exp1 pp_lem_exp exp2 pp_lem_exp exp3 pp_lem_ord order pp_lem_exp exp4 pp_lem_l l pp_annot annot | E_vector(exps) -> fprintf ppf "@[<0>(E_aux (%a [%a]) (%a, %a))@]" kwd "E_vector" (list_pp pp_semi_lem_exp pp_lem_exp) exps pp_lem_l l pp_annot annot - | E_vector_indexed(iexps) -> + | E_vector_indexed(iexps,default) -> (*TODO print out default when it is an nonempty*) let iformat ppf (i,e) = fprintf ppf "@[<1>(%i %a %a) %a@]" i kwd ", " pp_lem_exp e kwd ";" in let lformat ppf (i,e) = fprintf ppf "@[<1>(%i %a %a) @]" i kwd ", " pp_lem_exp e in fprintf ppf "@[<0>(E_aux (%a [%a]) (%a, %a))@]" kwd "E_vector_indexed" (list_pp iformat lformat) iexps pp_lem_l l pp_annot annot @@ -1127,7 +1127,8 @@ let doc_exp, doc_let = braces (doc_op (string "with") (exp e) (separate_map semi_sp doc_fexp fexps)) | E_vector exps -> brackets (separate_map comma exp exps) - | E_vector_indexed iexps -> + | E_vector_indexed (iexps, default) -> + (* XXX TODO print default when it is non-empty *) let iexp (i,e) = doc_op equals (doc_int i) (exp e) in brackets (separate_map comma iexp iexps) | E_vector_update(v,e1,e2) -> |
