parser: "Parse" type variable introducers (and discard them for now)
This commit is contained in:
@@ -690,14 +690,22 @@ impl<'t> Parse<'t> for Bind {
|
||||
p.consume().parse(PPrec::Max)?,
|
||||
vec![p.parse(Prec::Body.next())?],
|
||||
)),
|
||||
BindKind::Fn => Ok(Self(
|
||||
level,
|
||||
p.consume().parse(PPrec::Fn)?,
|
||||
vec![p.parse(Prec::Body.next())?],
|
||||
)),
|
||||
BindKind::Fn => {
|
||||
if p.consume().next_if(TKind::Lt)?.is_ok() {
|
||||
let _gty: Vec<FqPath> = p.list(vec![], (), TKind::Comma, TKind::Gt)?;
|
||||
}
|
||||
Ok(Self(
|
||||
level,
|
||||
p.parse(PPrec::Fn)?,
|
||||
vec![p.parse(Prec::Body.next())?],
|
||||
))
|
||||
}
|
||||
_ => {
|
||||
if p.consume().next_if(TKind::Lt)?.is_ok() {
|
||||
let _gty: Vec<FqPath> = p.list(vec![], (), TKind::Comma, TKind::Gt)?;
|
||||
}
|
||||
// let Pat
|
||||
let pat = p.consume().parse(PPrec::Tuple)?;
|
||||
let pat = p.parse(PPrec::Tuple)?;
|
||||
if p.next_if(TKind::Eq).allow_eof()?.is_none_or(|v| v.is_err()) {
|
||||
return Ok(Self(level, pat, vec![]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user