summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorFabio Cevasco <h3rald@h3rald.com>2014-02-22 10:07:37 +0100
committerFabio Cevasco <h3rald@h3rald.com>2014-02-22 10:07:37 +0100
commit067c3816ba317d2d2bcafdd3c2806df886b855b2 (patch)
tree5496de78c00166885a2fe65235fb8d59f83a92fc /lib
parent6621454dec0492044f76d1c78e9df7682048b83b (diff)
downloadNim-067c3816ba317d2d2bcafdd3c2806df886b855b2.tar.gz
Rewrote the changes to findAll using if/else
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/pegs.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/pegs.nim b/lib/pure/pegs.nim
index 3b1516e17..68b1ab223 100644
--- a/lib/pure/pegs.nim
+++ b/lib/pure/pegs.nim
@@ -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".} =