Closed baoyachi closed 10 months ago
take_till
only takes up to a token from a token set, not a parsed result, and does so using the ContainsToken
trait.
Your code can be fixed by changing it to ['"', '\\']
.
If you do want to take up to a parser, you need
repeat_till0
()
recognize()
the resultIn theory, we could make tag
return a struct Tag
, rather than an impl Parser
and impl ContainsToken for Tag<char>
but that seems like that would just confuse the issue more to have some parsers that can also be a token set.
THX
Please complete the following tasks
rust version
rustc 1.74.0 (79e9716c9 2023-11-13)
winnow version
0.5.33
Minimal reproducible code
parse_no_escaped_with_tag
vsparse_no_escaped_with_char
function is equivalent and currently does not support passing tags (char) to a List args.Steps to reproduce the bug with the above code
Actual Behaviour
parse_no_escaped_with_tag
cannot be compiledExpected Behaviour
parse_no_escaped_with_tag
vsparse_no_escaped_with_char
function also support .Additional Context
No response