summaryrefslogtreecommitdiff
path: root/lib/regex
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-10-04 10:59:36 -0700
committerOri Bernstein <ori@eigenstate.org>2015-10-04 20:35:52 -0700
commit8728342de349e7029312ddbd33c2710d2d03fff2 (patch)
tree392b0b93b70b3129f9fb790bc04cac9571eb05e5 /lib/regex
parent35bde60621ecf5cbcf07b743cafd9724f87faccb (diff)
downloadmc-8728342de349e7029312ddbd33c2710d2d03fff2.tar.gz
Make the interface for libbio expose errors.
Filling in all the error conditions correctly is only lightly tested, but it seems to work.
Diffstat (limited to 'lib/regex')
-rw-r--r--lib/regex/redump.myr7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/regex/redump.myr b/lib/regex/redump.myr
index 920b257..5c1e7bc 100644
--- a/lib/regex/redump.myr
+++ b/lib/regex/redump.myr
@@ -57,10 +57,13 @@ const runall = {re, files
const dump = {re, fd
while true
match bio.readln(fd)
- | `std.Some ln:
+ | `bio.Ok ln:
show(re, ln, regex.exec(re, ln))
std.slfree(ln)
- | `std.None:
+ | `bio.Eof:
+ break
+ | `bio.Err:
+ std.put("error reading from input")
break
;;
;;