File tree Expand file tree Collapse file tree 3 files changed +11
-13
lines changed Expand file tree Collapse file tree 3 files changed +11
-13
lines changed Original file line number Diff line number Diff line change 11# Package
22
3- version = " 0.0.3 "
3+ version = " 0.0.4 "
44author = " Esteban Castro Borsani (@nitely)"
55description = " A DFA based regex engine"
66license = " MIT"
77srcDir = " src"
8- skipDirs = @ [" tests" ]
8+ skipDirs = @ [" tests" , " docs " ]
99
1010requires " nim >= 1.0.4"
1111requires " unicodedb >= 0.7.2"
@@ -15,9 +15,8 @@ task test, "Test":
1515 exec " nim c -r -o:bin/nregex src/nregex.nim"
1616 exec " nim c -r tests/tests.nim"
1717 exec " nim c -r -d:forceRegexAtRuntime tests/tests.nim"
18- # VM register limit error, works on devel,
19- # well almost due to https://github.com/nim-lang/Nim/issues/13310
20- # exec "nim c -d:runTestAtCT tests/tests.nim"
18+ # when (NimMajor, NimMinor) >= (1, 1):
19+ # exec "nim c -d:runTestAtCT --maxLoopIterationsVM:1000000000 tests/tests.nim"
2120 exec " nim js -r -o:bin/nregex.js --styleCheck:off src/nregex.nim"
2221 exec " nim js -r --styleCheck:off tests/tests.nim"
2322 exec " nim js -r --styleCheck:off -d:forceRegexAtRuntime tests/tests.nim"
Original file line number Diff line number Diff line change @@ -409,14 +409,13 @@ iterator findAll*(
409409 var c: Rune
410410 var m: RegexMatch
411411 while i < len (s):
412- if find (s, pattern, m, i):
413- if i < m.boundaries.b+ 1 :
414- i = m.boundaries.b+ 1
415- else :
416- fastRuneAt (s, i, c, true )
417- yield m
418- else :
412+ if not find (s, pattern, m, i):
413+ break
414+ if i < m.boundaries.b+ 1 :
415+ i = m.boundaries.b+ 1
416+ else : # empty match
419417 fastRuneAt (s, i, c, true )
418+ yield m
420419
421420func findAll * (
422421 s: string ,
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ func isAnyAscii(r: Rune): bool {.inline.} =
105105 (r.int <= int8 .high and
106106 r != lineBreakRune)
107107
108- func swapCase (r: Rune ): Rune =
108+ func swapCase * (r: Rune ): Rune =
109109 result = r.toLower ()
110110 if result != r:
111111 return
You can’t perform that action at this time.
0 commit comments