From e6c5335d43bfbf2fffa3d3c44cde404c970e5ee6 Mon Sep 17 00:00:00 2001 From: John Turner Date: Fri, 14 Nov 2025 20:04:27 +0000 Subject: disallow trailing delimiter in SeparatedBy combinator --- tests/sexpr.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/sexpr.rs b/tests/sexpr.rs index 1f8a0af..77ef3a0 100644 --- a/tests/sexpr.rs +++ b/tests/sexpr.rs @@ -2,7 +2,7 @@ use mon::{ Parser, ParserIter, alpha1, alphanumeric, alphanumeric1, input::InputIter, numeric1, tag, - whitespace, + whitespace, whitespace1, }; #[derive(Debug)] @@ -35,7 +35,7 @@ fn int<'a>() -> impl Parser<&'a str, Output = Sexpr> { fn sexpr<'a>() -> impl Parser<&'a str, Output = Sexpr> { |it| { sexpr() - .separated_by(whitespace().repeated().many()) + .separated_by(whitespace1()) .many() .delimited_by(tag("("), tag(")")) .map(|output| Sexpr::List(output)) -- cgit v1.2.3