forked from gentoo-utils/gentoo-utils
port to new mon parsers
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
use mon::{Parser, r#if, take_while};
|
||||
use mon::{Parser, r#if};
|
||||
|
||||
use crate::useflag::UseFlag;
|
||||
|
||||
pub fn useflag<'a>() -> impl Parser<&'a str, Output = UseFlag> {
|
||||
let start = r#if(|c: &char| c.is_ascii_alphanumeric());
|
||||
let rest = take_while(r#if(|c: &char| {
|
||||
c.is_ascii_alphanumeric() || "+_@-".contains(*c)
|
||||
}));
|
||||
let rest = r#if(|c: &char| c.is_ascii_alphanumeric() || "+_@-".contains(*c)).list(0..);
|
||||
|
||||
start
|
||||
.and(rest)
|
||||
|
||||
Reference in New Issue
Block a user