From 2c96e1c6de13821558b5aa40212a0eb7b1b6856f Mon Sep 17 00:00:00 2001 From: John Turner Date: Fri, 31 Oct 2025 22:00:42 +0000 Subject: create ParserIter trait --- tests/sexpr.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/sexpr.rs b/tests/sexpr.rs index ecef773..8d02793 100644 --- a/tests/sexpr.rs +++ b/tests/sexpr.rs @@ -1,7 +1,7 @@ #![allow(dead_code)] use mon::{ - Parser, ParserResult, alpha1, alphanumeric, alphanumeric1, input::InputIter, numeric1, tag, + Parser, ParserIter, alpha1, alphanumeric, alphanumeric1, input::InputIter, numeric1, tag, whitespace, }; @@ -35,7 +35,8 @@ fn int<'a>() -> impl Parser<&'a str, Output = Sexpr> { fn sexpr<'a>() -> impl Parser<&'a str, Output = Sexpr> { |it| { sexpr() - .separated_by(whitespace(), 0..) + .separated_by(whitespace()) + .many() .delimited_by(tag("("), tag(")")) .map(|output| Sexpr::List(output)) .or(atom()) -- cgit v1.2.3