We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a0b9d0 commit 97a03a4Copy full SHA for 97a03a4
compiler/lib/shape.ml
@@ -98,17 +98,22 @@ let of_string (s : string) =
98
| 'F' ->
99
next ();
100
parse_fun ()
101
- | c -> failwith (String.make 1 c)
+ | _ -> assert false
102
and parse_block acc =
103
- let x = parse_shape () in
104
match current () with
105
- | ',' ->
106
- next ();
107
- parse_block (x :: acc)
108
| ']' ->
109
110
- Block (List.rev (x :: acc))
111
- | _ -> assert false
+ Block (List.rev acc)
+ | _ -> (
+ let x = parse_shape () in
+ match current () with
+ | ',' ->
+ next ();
112
+ parse_block (x :: acc)
113
+ | ']' ->
114
115
+ Block (List.rev (x :: acc))
116
+ | _ -> assert false)
117
and parse_fun () =
118
let () = parse_char '(' in
119
let arity = parse_int 0 in
0 commit comments