summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlasdair2020-08-24 16:17:17 +0100
committerAlasdair2020-08-24 16:23:08 +0100
commit758a5b23ff0426ab6cf880d181fce1552b7f3ca7 (patch)
tree37c147473bfd4905849695843d9c5fcf6b6a04d7 /src
parent115d8e891c89db82f451f02458ce408706fee8a9 (diff)
Reformat tweaks
Diffstat (limited to 'src')
-rw-r--r--src/pretty_print_sail.ml5
1 files changed, 5 insertions, 0 deletions
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