diff options
| author | Alasdair Armstrong | 2019-03-21 14:38:22 +0000 |
|---|---|---|
| committer | GitHub | 2019-03-21 14:38:22 +0000 |
| commit | 0e2f1710a951bae15a73230a76bed5b5bb32aee3 (patch) | |
| tree | a96b7f2beeb0e0c933a55fe7d717198a6146c4ed /src/pretty_print_sail.ml | |
| parent | e6ae1eab6c2e239b78153cbb5a3fb234c72eb088 (diff) | |
| parent | 03e243d8dd6819e1e8e0694db80962de239dd8e0 (diff) | |
Merge pull request #38 from crabtw/sail2
Fix scattered mapping printing and output message for missing val spec
Diffstat (limited to 'src/pretty_print_sail.ml')
| -rw-r--r-- | src/pretty_print_sail.ml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pretty_print_sail.ml b/src/pretty_print_sail.ml index 27f626ea..af25f189 100644 --- a/src/pretty_print_sail.ml +++ b/src/pretty_print_sail.ml @@ -574,7 +574,7 @@ let doc_mapdef (MD_aux (MD_mapping (id, typa, mapcls), _)) = | _ -> let sep = string "," ^^ hardline in let clauses = separate_map sep doc_mapcl mapcls in - string "mapping" ^^ space ^^ doc_id id ^^ space ^^ string "=" ^^ (surround 2 0 lbrace clauses rbrace) + string "mapping" ^^ space ^^ doc_id id ^^ space ^^ string "=" ^^ space ^^ (surround 2 0 lbrace clauses rbrace) let doc_dec (DEC_aux (reg,_)) = match reg with @@ -663,6 +663,10 @@ let rec doc_scattered (SD_aux (sd_aux, _)) = separate space [string "scattered mapping"; doc_id id; string ":"; doc_typ typ] | SD_unioncl (id, tu) -> separate space [string "union clause"; doc_id id; equals; doc_union tu] + | SD_mapping (id, _) -> + string "scattered" ^^ space ^^ string "mapping" ^^ space ^^ doc_id id + | SD_mapcl (id, mapcl) -> + separate space [string "mapping clause"; doc_id id; equals; doc_mapcl mapcl] let rec doc_def def = group (match def with | DEF_default df -> doc_default df |
