I have tried to record an extra dependency using [] ABC…DE
notation as suggested here, but this fails with “Syntax errors, please try again.”. Related code in parse_dependency() (parse.rs:594)
is:
let (i, mut type_) = delimited(
char('['),
alt((
map(u64, |n| DepType::Numbered(n as usize, false)),
value(DepType::ExtraKnown, char('*')),
value(DepType::ExtraUnknown, take_till(|c| c != ']')),
)),
char(']'),
)(i)?;
From my (weak) Rust/nom understanding, take_till(|c| c != ']')
followed by char(']')
can’t match anything, especially not the empty string. When changing the line to something like:
value(DepType::ExtraUnknown, take(0u8)),
or (more tolerant):
value(DepType::ExtraUnknown, take_till(|c| c != ' ')),
this will fix parsing the [] ABC…DE
notation.
-Marc