Skip to content

Commit

Permalink
dune fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinkOpenly committed Jun 18, 2024
1 parent 3de79e5 commit 0cca70f
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions src/sail_json_backend/json.ml
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,20 @@ let rec string_list_of_mpat x =
debug_print "MP_tuple";
List.concat (List.map string_list_of_mpat mpl)
| MP_aux (MP_vector _, _) ->
debug_print "unsupported MP_vector"; [ "unsupported MP_vector" ]
debug_print "unsupported MP_vector";
["unsupported MP_vector"]
| MP_aux (MP_list _, _) ->
debug_print "unsupported MP_list"; [ "unsupported MP_list" ]
debug_print "unsupported MP_list";
["unsupported MP_list"]
| MP_aux (MP_cons _, _) ->
debug_print "unsupported MP_cons"; [ "unsupported MP_cons" ]
debug_print "unsupported MP_cons";
["unsupported MP_cons"]
| MP_aux (MP_as _, _) ->
debug_print "unsupported MP_as"; [ "unsupported MP_as" ]
debug_print "unsupported MP_as";
["unsupported MP_as"]
| MP_aux (MP_struct _, _) ->
debug_print "unsupported MP_struct"; [ "unsupported MP_struct" ]
debug_print "unsupported MP_struct";
["unsupported MP_struct"]
| _ -> assert false

let parse_encdec_mpat mp pb format =
Expand Down Expand Up @@ -271,13 +276,11 @@ let parse_mapcl i mc =
let format =
match mc with
| MCL_aux (_, (annot, _)) ->
String.concat "-" (
List.map (fun attr ->
match attr with
(_, "format", Some (AD_aux( AD_string(s), _ ))) -> s
| _ -> ""
)
annot.attrs)
String.concat "-"
(List.map
(fun attr -> match attr with _, "format", Some (AD_aux (AD_string s, _)) -> s | _ -> "")
annot.attrs
)
in
begin
match string_of_id i with
Expand All @@ -300,7 +303,11 @@ let parse_mapcl i mc =
List.iter
(fun mnemonic ->
List.iter
(fun attr -> match attr with (_, "name", Some (AD_aux( AD_string(name), _))) -> Hashtbl.add names mnemonic name | _ -> ())
(fun attr ->
match attr with
| _, "name", Some (AD_aux (AD_string name, _)) -> Hashtbl.add names mnemonic name
| _ -> ()
)
annot.attrs
)
sl
Expand All @@ -326,7 +333,11 @@ let parse_type_union i ucl =
let l = List.map string_of_typ x in
Hashtbl.add sigs (string_of_id d) l;
List.iter
(fun attr -> match attr with (_, "name", Some (AD_aux( AD_string(s), _))) -> Hashtbl.add names (string_of_id d) s | _ -> ())
(fun attr ->
match attr with
| _, "name", Some (AD_aux (AD_string s, _)) -> Hashtbl.add names (string_of_id d) s
| _ -> ()
)
annot.attrs;
begin
match annot.doc_comment with None -> () | Some s -> Hashtbl.add descriptions (string_of_id d) s
Expand Down

0 comments on commit 0cca70f

Please sign in to comment.