* fixes #19104; peg Incorrect captures [backport:1.6] * add tests Co-authored-by: khchen <khchen@gmail.com>
This commit is contained in:
parent
79afee868d
commit
2b80ff2374
2 changed files with 8 additions and 1 deletions
|
|
@ -158,6 +158,10 @@ block:
|
|||
privateAccess(NonTerminal)
|
||||
privateAccess(Captures)
|
||||
|
||||
if "test" =~ peg"s <- {{\ident}}": # bug #19104
|
||||
doAssert matches[0] == "test"
|
||||
doAssert matches[1] == "test", $matches[1]
|
||||
|
||||
doAssert escapePeg("abc''def'") == r"'abc'\x27\x27'def'\x27"
|
||||
doAssert match("(a b c)", peg"'(' @ ')'")
|
||||
doAssert match("W_HI_Le", peg"\y 'while'")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue