diff options
| author | Alasdair Armstrong | 2017-10-13 16:21:23 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2017-10-13 16:21:23 +0100 |
| commit | 31b19d42bba272eb358887ab31cb4e221c51060c (patch) | |
| tree | c0a31eb2783d0a0913f3cfaa2010a327dfcfa442 /src/pretty_print_sail2.ml | |
| parent | a5fa2f549896e4e8a7262a71ffd377066b07a67c (diff) | |
Repeat and while loops in menhir parser and pretty printer
Diffstat (limited to 'src/pretty_print_sail2.ml')
| -rw-r--r-- | src/pretty_print_sail2.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pretty_print_sail2.ml b/src/pretty_print_sail2.ml index 4d3befb7..3fa05132 100644 --- a/src/pretty_print_sail2.ml +++ b/src/pretty_print_sail2.ml @@ -181,7 +181,10 @@ let rec doc_exp (E_aux (e_aux, _) as exp) = | E_list exps -> string "E_list" | E_cons (exp1, exp2) -> string "E_cons" | E_record fexps -> string "E_record" - | E_loop _ -> string "E_loop" + | E_loop (While, cond, exp) -> + separate space [string "while"; doc_exp cond; string "do"; doc_exp exp] + | E_loop (Until, cond, exp) -> + separate space [string "repeat"; doc_exp exp; string "until"; doc_exp cond] | E_record_update (exp, fexps) -> string "E_record_update" | E_vector_append (exp1, exp2) -> separate space [doc_atomic_exp exp1; string "@"; doc_atomic_exp exp2] | E_case (exp, pexps) -> |
