noodling on sexp

This commit is contained in:
Greg Shuflin
2024-01-29 17:28:01 -08:00
parent cdbbb8214f
commit a9d08a9213
5 changed files with 21 additions and 2 deletions

View File

@@ -12,9 +12,13 @@ pub fn surrounded_by<I, O1, O2, E>(
surrounding: impl Parser<I, O2, E>,
) -> impl Parser<I, O1, E> {
move |input| {
println!("surrounded_by");
let (_result1, rest1) = surrounding.parse(input)?;
println!("A");
let (result2, rest2) = main.parse(rest1)?;
println!("B");
let (_result3, rest3) = surrounding.parse(rest2)?;
println!("C");
Ok((result2, rest3))
}
}