mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-17 06:21:18 +00:00
fixes lots of regressions
This commit is contained in:
@@ -1733,12 +1733,14 @@ when isMainModule:
|
||||
doAssert matches[0] == "a"
|
||||
else:
|
||||
doAssert false
|
||||
|
||||
if match("abcdefg", peg"c {d} ef {g}", matches, 2):
|
||||
doAssert matches[0] == "d"
|
||||
doAssert matches[1] == "g"
|
||||
else:
|
||||
doAssert false
|
||||
|
||||
block:
|
||||
var matches: array[0..2, string]
|
||||
if match("abcdefg", peg"c {d} ef {g}", matches, 2):
|
||||
doAssert matches[0] == "d"
|
||||
doAssert matches[1] == "g"
|
||||
else:
|
||||
doAssert false
|
||||
|
||||
for x in findAll("abcdef", peg"{.}", 3):
|
||||
echo x
|
||||
|
||||
Reference in New Issue
Block a user