fixes lots of regressions
This commit is contained in:
parent
43de61f37b
commit
1bdc0d1dd3
5 changed files with 20 additions and 15 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue