update mon and use new ascii parsers

This commit is contained in:
John Turner
2025-11-20 23:27:41 +00:00
parent ff7d9b312f
commit 699d4bafd0
6 changed files with 58 additions and 35 deletions

View File

@@ -1,4 +1,4 @@
use mon::{Parser, ParserIter, alphanumeric, one_of, tag};
use mon::{Parser, ParserIter, ascii_alphanumeric, one_of, tag};
use crate::{
Parseable,
@@ -9,8 +9,11 @@ impl<'a> Parseable<'a, &'a str> for UseFlag {
type Parser = impl Parser<&'a str, Output = Self>;
fn parser() -> Self::Parser {
let start = alphanumeric();
let rest = alphanumeric().or(one_of("+_@-".chars())).repeated().many();
let start = ascii_alphanumeric();
let rest = ascii_alphanumeric()
.or(one_of("+_@-".chars()))
.repeated()
.many();
start
.and(rest)