ref: 95a93936f420dd480454eb97c25b02874da7a966
parent: 943c865bcfacb00af4c681fc36fbcab2b7f9a55f
author: Milo Turner <iitalics@gmail.com>
date: Sat Sep 16 09:02:20 EDT 2017
fix some docs that were broken by renaming
--- a/README.md
+++ b/README.md
@@ -53,7 +53,7 @@
str = "match against this!"
match regex.compile(".*")
| `std.Ok r: re = r
- | `std.Fail m: std.fatal("couldn't compile regex: {}\n", m)
+ | `std.Err m: std.fatal("couldn't compile regex: {}\n", m)
;;
match regex.exec(re, str)
| `std.Some _: std.put("regex matched\n")
--- a/lib/regex/myr-regex.3
+++ b/lib/regex/myr-regex.3
@@ -167,17 +167,18 @@
use regex
const main = {
- match regex.compile(pat)
var i
- | `std.Success re:
+
+ match regex.compile(pat)
+ | `std.Ok re:
match regex.exec(re, text)
| `std.Some matches:
for i = 0; i < matches.len; i++
- std.put("Match %i: %s\n", i, match[i])
+ std.put("Match {}: {}\n", i, matches[i])
;;
| `std.None: std.put("Text did not match\n")
;;
- | `std.Failure err:
+ | `std.Err err:
std.put("failed to compile regex")
;;
}