From 758a5b23ff0426ab6cf880d181fce1552b7f3ca7 Mon Sep 17 00:00:00 2001 From: Alasdair Date: Mon, 24 Aug 2020 16:17:17 +0100 Subject: Reformat tweaks --- src/pretty_print_sail.ml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/pretty_print_sail.ml b/src/pretty_print_sail.ml index 85684887..4114920a 100644 --- a/src/pretty_print_sail.ml +++ b/src/pretty_print_sail.ml @@ -398,6 +398,11 @@ let rec doc_exp (E_aux (e_aux, _) as exp) = | E_app_infix _ -> doc_infix 0 exp | E_tuple exps -> parens (separate_map (comma ^^ space) doc_exp exps) + | E_if (if_exp, then_exp, (E_aux (E_if (_, _, _), _) as else_exp)) when !opt_insert_braces -> + separate space [string "if"; doc_exp if_exp; string "then"] ^^ space + ^^ doc_exp_as_block then_exp + ^^ space ^^ string "else" ^^ space + ^^ doc_exp else_exp | E_if (if_exp, then_exp, else_exp) when !opt_insert_braces -> separate space [string "if"; doc_exp if_exp; string "then"] ^^ space ^^ doc_exp_as_block then_exp -- cgit v1.2.3