update to new version of mon

This commit is contained in:
John Turner
2025-10-30 22:40:29 +00:00
parent 72b6774e2b
commit 820cb3ba48
6 changed files with 24 additions and 24 deletions

View File

@@ -74,8 +74,8 @@ impl<'a> Parseable<'a, &'a str> for Version {
type Parser = impl Parser<&'a str, Output = Self>;
fn parser() -> Self::Parser {
let numbers = VersionNumber::parser().separated_list(tag("."), 1..);
let suffixes = VersionSuffix::parser().separated_list(tag("_"), 0..);
let numbers = VersionNumber::parser().separated_by(tag("."), 1..);
let suffixes = VersionSuffix::parser().separated_by(tag("_"), 0..);
let rev = VersionNumber::parser().preceded_by(tag("-r"));
numbers
@@ -96,7 +96,7 @@ impl<'a> Parseable<'a, &'a str> for Category {
fn parser() -> Self::Parser {
let start = r#if(|c: &char| c.is_ascii_alphanumeric() || *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)
@@ -116,7 +116,7 @@ impl<'a> Parseable<'a, &'a str> for Name {
r#if(|c: &char| c.is_ascii_alphanumeric() || "_+-".contains(*c)).not(),
)),
)
.list(0..);
.repeated(0..);
start
.and(rest)
@@ -140,7 +140,7 @@ impl<'a> Parseable<'a, &'a str> for SlotName {
fn parser() -> Self::Parser {
let start = r#if(|c: &char| c.is_ascii_alphanumeric() || *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)
@@ -257,7 +257,7 @@ impl<'a> Parseable<'a, &'a str> for Atom {
.and(Slot::parser().preceded_by(tag(":")).opt())
.and(
UseDep::parser()
.separated_list(tag(","), 0..)
.separated_by(tag(","), 0..)
.delimited_by(tag("["), tag("]"))
.opt(),
)