Skip to content

Commit

Permalink
rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
snapdgn committed May 23, 2024
1 parent 7be8ee7 commit c3635e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sail_json_backend/json.ml
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,8 @@ let find_operand zero_bit_pattern (l, r) =
TODO: Come up with a more robust implementation to parse the operands.
*)
let default_operand optional optional_operand =
let values = Hashtbl.find_all mappings optional_operand in
let default_operand optional opt_operand =
let values = Hashtbl.find_all mappings opt_operand in
let zero_bit_pattern s = Str.string_match (Str.regexp "0b0+$") s 0 in
match optional with
| Some true -> List.find_map (find_operand zero_bit_pattern) values
Expand All @@ -481,8 +481,8 @@ let json_of_operand k op =
let opmap = List.combine (Hashtbl.find operands k) (Hashtbl.find sigs k) in
let opplus = remove_identity_funcs op in
let opname = List.hd (String.split_on_char ',' opplus) in
let optional, optional_operand = optional_operand k op in
let default = default_operand optional optional_operand in
let optional, opt_operand = optional_operand k op in
let default = default_operand optional opt_operand in
let optional_str = match optional with
| Some b -> string_of_bool b
| None -> "false" in
Expand Down

0 comments on commit c3635e9

Please sign in to comment.