shithub: mc

Download patch

ref: 152a1b90e2f9cb2f8afd51223c1bcd40b41a899b
parent: da4fbb8f487fc53d091161c41c0080e49e5b0cce
author: Ori Bernstein <[email protected]>
date: Tue Oct 22 13:07:27 EDT 2013

Exec returns true if the whole regex matches.

--- a/interp.myr
+++ b/interp.myr
@@ -23,7 +23,7 @@
 		;;
 	;;
 	match re.matched
-	`std.Some thr:	-> true;;
+	`std.Some thr:	-> re.strp == str.len;;
 	`std.None:	-> false;;
 	;;
 }
--- a/main.myr
+++ b/main.myr
@@ -5,7 +5,7 @@
 	var found
 	match regex.compile("(a|b)*")
 	`std.Success re:
-		found = regex.exec(re, "babaas")
+		found = regex.exec(re, "ababaasssss")
 		std.put("Found = %t: len = %z\n", found, re.strp)
 		-> 0
 		;;