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

Code cleanup

parent 632499f3
...@@ -24,9 +24,9 @@ let read_program ic = ...@@ -24,9 +24,9 @@ let read_program ic =
| ']', [] -> failwith "unmatched ']'" | ']', [] -> failwith "unmatched ']'"
| ']', (hd :: tl) -> next (Loop (List.rev cur) :: hd) tl | ']', (hd :: tl) -> next (Loop (List.rev cur) :: hd) tl
| _ -> next cur stack | _ -> next cur stack
with End_of_file -> with
if List.length stack > 0 then failwith "unmatched '['"; | End_of_file when List.length stack > 0 -> failwith "unmatched '['"
List.rev cur | End_of_file -> List.rev cur
in in
next [] [] 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