summaryrefslogtreecommitdiff
path: root/src/ebuild/parsers.rs
diff options
context:
space:
mode:
authorJohn Turner <jturner.usa@gmail.com>2025-10-30 22:40:29 +0000
committerJohn Turner <jturner.usa@gmail.com>2025-10-30 22:40:29 +0000
commit820cb3ba482c6af2324421cc0879910ab8b10edc (patch)
tree048d7553437260c64212fbc127c06adf9e538bdd /src/ebuild/parsers.rs
parent72b6774e2b43edf4228df2d5a7af20c041e6745c (diff)
downloadgentoo-utils-820cb3ba482c6af2324421cc0879910ab8b10edc.tar.gz
update to new version of mon
Diffstat (limited to 'src/ebuild/parsers.rs')
-rw-r--r--src/ebuild/parsers.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ebuild/parsers.rs b/src/ebuild/parsers.rs
index ef713d2..56b86ba 100644
--- a/src/ebuild/parsers.rs
+++ b/src/ebuild/parsers.rs
@@ -26,7 +26,7 @@ impl<'a> Parseable<'a, &'a str> for Uri {
.followed_by(tag("://"))
.map(|output: &str| output.to_string());
let path = r#if(|c: &char| !c.is_ascii_whitespace())
- .list(1..)
+ .repeated(1..)
.recognize()
.map(|output: &str| output.to_string());
@@ -42,7 +42,7 @@ impl<'a> Parseable<'a, &'a str> for SrcUri {
fn parser() -> Self::Parser {
let filename = || {
r#if(|c: &char| !c.is_ascii_whitespace())
- .list(1..)
+ .repeated(1..)
.recognize()
.map(|output: &str| PathBuf::from(output))
};
@@ -65,7 +65,7 @@ impl<'a> Parseable<'a, &'a str> for License {
fn parser() -> Self::Parser {
let start = r#if(|c: &char| c.is_ascii_alphanumeric() || "_".contains(*c));
- let rest = r#if(|c: &char| c.is_ascii_alphanumeric() || "+_.-".contains(*c)).list(0..);
+ let rest = r#if(|c: &char| c.is_ascii_alphanumeric() || "+_.-".contains(*c)).repeated(0..);
start
.and(rest)
@@ -79,7 +79,7 @@ impl<'a> Parseable<'a, &'a str> for Eapi {
fn parser() -> Self::Parser {
let start = r#if(|c: &char| c.is_ascii_alphanumeric() || "_".contains(*c));
- let rest = r#if(|c: &char| c.is_ascii_alphanumeric() || "+_.-".contains(*c)).list(0..);
+ let rest = r#if(|c: &char| c.is_ascii_alphanumeric() || "+_.-".contains(*c)).repeated(0..);
start
.and(rest)
@@ -96,7 +96,7 @@ impl<'a> Parseable<'a, &'a str> for Eclass {
fn parser() -> Self::Parser {
r#if(|c: &char| !c.is_ascii_whitespace())
- .list(1..)
+ .repeated(1..)
.recognize()
.map(|output: &str| Eclass(output.to_string()))
}
@@ -111,18 +111,18 @@ where
fn parser() -> Self::Parser {
|it| {
let all_of_group = Depend::parser()
- .separated_list(whitespace1(), 1..)
+ .separated_by(whitespace1(), 1..)
.delimited_by(tag("(").followed_by(whitespace1()), tag(")"))
.map(|exprs| Depend::AllOf(exprs));
let any_of_group = Depend::parser()
- .separated_list(whitespace1(), 1..)
+ .separated_by(whitespace1(), 1..)
.delimited_by(tag("(").followed_by(whitespace1()), tag(")"))
.preceded_by(tag("||").followed_by(whitespace1()))
.map(|exprs| Depend::AnyOf(exprs));
let one_of_group = Depend::parser()
- .separated_list(whitespace1(), 1..)
+ .separated_by(whitespace1(), 1..)
.delimited_by(tag("(").followed_by(whitespace1()), tag(")"))
.preceded_by(tag("^^").followed_by(whitespace1()))
.map(|exprs| Depend::OneOf(exprs));
@@ -131,7 +131,7 @@ where
.followed_by(whitespace1())
.and(
Depend::parser()
- .separated_list(whitespace1(), 1..)
+ .separated_by(whitespace1(), 1..)
.delimited_by(tag("(").followed_by(whitespace1()), tag(")")),
)
.map(|(conditional, exprs)| Depend::ConditionalGroup(conditional, exprs));
@@ -189,7 +189,7 @@ mod test {
let it = InputIter::new("flag? ( || ( foo/bar foo/bar ) )");
Depend::<Atom>::parser()
- .separated_list(whitespace1(), 0..)
+ .separated_by(whitespace1(), 0..)
.check_finished(it)
.unwrap();
}