diff options
| author | John Turner <jturner.usa@gmail.com> | 2025-10-31 22:00:42 +0000 |
|---|---|---|
| committer | John Turner <jturner.usa@gmail.com> | 2025-11-01 17:13:21 +0000 |
| commit | 2c96e1c6de13821558b5aa40212a0eb7b1b6856f (patch) | |
| tree | 66f2b6bdc5dec5b6c00f3e9a32d4ee93fdb3a4de /tests | |
| parent | 821f132bd5c8678327c2ab8764bd7d172a7b7ee4 (diff) | |
| download | mon-2c96e1c6de13821558b5aa40212a0eb7b1b6856f.tar.gz | |
create ParserIter trait
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/sexpr.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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()) |
