Closed baoyachi closed 9 months ago
fix #427
rust code
use winnow::combinator::preceded; use winnow::prelude::*; use winnow::error::InputError; fn main() { fn parser<'s, 'a>(i: &mut &'s [u8]) -> PResult<u8, InputError<&'s [u8]>> { preceded(b"hello", b'a').parse_next(i) } assert_eq!(parser.parse_peek(&b"helloabc"[..]), Ok((&b"bc"[..], b'a'))); }
Modify the debug trace before modification
> preceded | [ 104, 101, 1 > tag | [ 104, 101, 1 < tag | +5
one_of | [
97,
98,
99,
any | [
< any | +1
| verify |
< one_of | +1 < preceded | +6
Debug trace after modification
tag | [
< tag | +1 < preceded | +6
Superseded by #464
fix #427
rust code
Modify the debug trace before modification
97,
98,
99,
97,
98,
99,
< any | +1
| verify |
< one_of | +1 < preceded | +6
Debug trace after modification
97,
98,
99,
< tag | +1 < preceded | +6