Skip to content
Snippets Groups Projects
Commit c8bea380 authored by Taddeüs Kroes's avatar Taddeüs Kroes
Browse files

Code cleanup

parent 632499f3
Branches opt
No related tags found
No related merge requests found
......@@ -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 [] []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment