Commit c8bea380 authored by Taddeüs Kroes's avatar Taddeüs Kroes

Code cleanup

parent 632499f3
......@@ -24,9 +24,9 @@ let read_program ic =
| ']', [] -> failwith "unmatched ']'"
| ']', (hd :: tl) -> next (Loop (List.rev cur) :: hd) tl
| _ -> next cur stack
with End_of_file ->
if List.length stack > 0 then failwith "unmatched '['";
List.rev cur
with
| End_of_file when List.length stack > 0 -> failwith "unmatched '['"
| End_of_file -> List.rev cur
in
next [] []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment