update parsers to use the ParserIter trait from mon

This commit is contained in:
John Turner
2025-11-01 17:28:19 +00:00
parent 6b04125d14
commit a38b01cd04
5 changed files with 53 additions and 28 deletions

View File

@@ -1,4 +1,4 @@
use mon::{Parser, r#if, tag};
use mon::{Parser, ParserIter, r#if, tag};
use crate::{
Parseable,
@@ -10,7 +10,9 @@ impl<'a> Parseable<'a, &'a str> for UseFlag {
fn parser() -> Self::Parser {
let start = r#if(|c: &char| c.is_ascii_alphanumeric());
let rest = r#if(|c: &char| c.is_ascii_alphanumeric() || "+_@-".contains(*c)).repeated(0..);
let rest = r#if(|c: &char| c.is_ascii_alphanumeric() || "+_@-".contains(*c))
.repeated()
.many();
start
.and(rest)