impl profile evaluation

This commit is contained in:
2025-11-29 20:43:28 +00:00
parent e67e20ef29
commit 12d362983d
15 changed files with 1364 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
use mon::{Parser, tag};
use crate::{Parseable, atom::Atom, repo::profile::packages::Package};
impl<'a> Parseable<'a, &'a str> for Package {
type Parser = impl Parser<&'a str, Output = Self>;
fn parser() -> Self::Parser {
Atom::parser()
.preceded_by(tag("*"))
.map(Package::Add)
.or(Atom::parser().preceded_by(tag("-*")).map(Package::Remove))
}
}