diff options
| author | Alasdair Armstrong | 2017-12-05 20:00:26 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2017-12-05 20:00:26 +0000 |
| commit | 44e9396fa90ab68ee4c8d9674c6bbad6fc851c6d (patch) | |
| tree | 9d70ccdadfca9ecf0422ee4919b2729b03f42414 /src/pretty_print_sail2.ml | |
| parent | 680a5b9dc1db936536c6603aed065ccbd8eabeb5 (diff) | |
Better support for exceptions in sail for ASL specs that need them.
Diffstat (limited to 'src/pretty_print_sail2.ml')
| -rw-r--r-- | src/pretty_print_sail2.ml | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pretty_print_sail2.ml b/src/pretty_print_sail2.ml index 43c8eca9..82d3878b 100644 --- a/src/pretty_print_sail2.ml +++ b/src/pretty_print_sail2.ml @@ -315,7 +315,7 @@ let rec doc_exp (E_aux (e_aux, _) as exp) = | _ -> header ^//^ doc_exp exp4 end (* Resugar an assert with an empty message *) - | E_throw exp -> assert false + | E_throw exp -> string "throw" ^^ parens (doc_exp exp) | E_try (exp, pexps) -> assert false | E_return exp -> string "return" ^^ parens (doc_exp exp) | E_app (id, [exp]) when Id.compare (mk_id "pow2") id == 0 -> @@ -324,7 +324,6 @@ let rec doc_exp (E_aux (e_aux, _) as exp) = and doc_infix n (E_aux (e_aux, _) as exp) = match e_aux with | E_app_infix (l, op, r) when n < 10 -> - let module M = Map.Make(String) in begin try match Bindings.find op !fixities with @@ -500,7 +499,6 @@ let rec doc_def def = group (match def with | DEF_reg_dec dec -> doc_dec dec | DEF_scattered sdef -> doc_scattered sdef | DEF_fixity (prec, n, id) -> - print_endline ("YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY " ^ string_of_id id); fixities := Bindings.add id (prec, int_of_big_int n) !fixities; separate space [doc_prec prec; doc_int n; doc_id id] | DEF_overload (id, ids) -> |
