Rewrote the changes to findAll using if/else

This commit is contained in:
Fabio Cevasco
2014-02-22 10:07:37 +01:00
parent 6621454dec
commit 067c3816ba

View File

@@ -838,9 +838,9 @@ iterator findAll*(s: string, pattern: TPeg, start = 0): string =
var L = rawMatch(s, pattern, i, c)
if L < 0:
inc(i, 1)
continue
yield substr(s, i, i+L-1)
inc(i, L)
else:
yield substr(s, i, i+L-1)
inc(i, L)
proc findAll*(s: string, pattern: TPeg, start = 0): seq[string] {.
nosideEffect, rtl, extern: "npegs$1".} =