summaryrefslogtreecommitdiff
path: root/src/pretty_print_sail.ml
diff options
context:
space:
mode:
authorBrian Campbell2017-08-17 10:58:00 +0100
committerBrian Campbell2017-08-17 10:58:00 +0100
commitbc156a0c30ddc4e09586ec43e901ce94832bc8e3 (patch)
tree5fbb467a0c0f4882b8c1b4add4c730a308af3bab /src/pretty_print_sail.ml
parentf88cb793118d28d061fdee4d5bd8317f541136b8 (diff)
parent9f013687086937df8be81dd6a0ebd86fc750abf7 (diff)
Merge branch 'experiments' of bitbucket.org:Peter_Sewell/sail into mono-experiments
Diffstat (limited to 'src/pretty_print_sail.ml')
-rw-r--r--src/pretty_print_sail.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pretty_print_sail.ml b/src/pretty_print_sail.ml
index a63df7ea..bb1d7357 100644
--- a/src/pretty_print_sail.ml
+++ b/src/pretty_print_sail.ml
@@ -277,6 +277,10 @@ let doc_exp, doc_let =
(doc_op equals (atomic_exp e1 ^^ colon ^^ atomic_exp e2) (exp e3)))
| E_list exps ->
squarebarbars (separate_map comma exp exps)
+ | E_try(e,pexps) ->
+ let opening = separate space [string "try"; exp e; string "catch"; lbrace] in
+ let cases = separate_map (break 1) doc_case pexps in
+ surround 2 1 opening cases rbrace
| E_case(e,pexps) ->
let opening = separate space [string "switch"; exp e; lbrace] in
let cases = separate_map (break 1) doc_case pexps in
@@ -287,6 +291,8 @@ let doc_exp, doc_let =
string "constraint" ^^ parens (doc_nexp_constraint nc)
| E_exit e ->
separate space [string "exit"; atomic_exp e;]
+ | E_throw e ->
+ separate space [string "throw"; atomic_exp e;]
| E_return e ->
separate space [string "return"; atomic_exp e;]
| E_assert(c,m) ->