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)?,
|
p.consume().parse(PPrec::Max)?,
|
||||||
vec![p.parse(Prec::Body.next())?],
|
vec![p.parse(Prec::Body.next())?],
|
||||||
)),
|
)),
|
||||||
BindKind::Fn => Ok(Self(
|
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,
|
level,
|
||||||
p.consume().parse(PPrec::Fn)?,
|
p.parse(PPrec::Fn)?,
|
||||||
vec![p.parse(Prec::Body.next())?],
|
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
|
||||||
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()) {
|
if p.next_if(TKind::Eq).allow_eof()?.is_none_or(|v| v.is_err()) {
|
||||||
return Ok(Self(level, pat, vec![]));
|
return Ok(Self(level, pat, vec![]));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user