ref: d336607529eafae46aee936b08dac1e84c228f56
parent: ef39ec1f6098ff0444b9ca36091204534cecedda
author: Ori Bernstein <[email protected]>
date: Mon Dec 30 18:56:31 EST 2013
Check if we think we found an early end of string.
--- a/compile.myr
+++ b/compile.myr
@@ -58,6 +58,13 @@
| `None: -> `std.Failure (`Earlystop)
| `Fail f: -> `std.Failure f
| `Some t:
+ /*
+ we can stop early if we get
+ an incorrectly encoded char
+ */
+ if re.pat.len > 0
+ -> `std.Failure (`Earlystop)
+ ;;
dump(re, t, 0)
append(re, `Ilbra 0)
gen(re, t)