make depend::Expr generic over Parseables

This commit is contained in:
John Turner
2025-10-29 12:50:07 +00:00
parent bdd1188409
commit b5765118fe
3 changed files with 18 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
use gentoo_utils::{
Parseable,
atom::Atom,
depend::{self, Expr},
};
use mon::{Parser, eof, input::InputIter, tag, whitespace1};
@@ -17,7 +18,7 @@ fn parse_md5_cache() {
if line.starts_with("DEPEND=") {
eprintln!("{line}");
eprintln!();
Expr::parser()
Expr::<Atom>::parser()
.separated_list(whitespace1(), 0..)
.ignore()
.or(eof())