Separating parsing of for in predicates and types

This commit is contained in:
Matthew Jasper 2020-06-10 11:30:48 +01:00
parent 560b98bc50
commit 506e1ddbfa
12 changed files with 507 additions and 291 deletions

View file

@ -2052,6 +2052,8 @@ pub struct WherePred {
}
impl ast::TypeBoundsOwner for WherePred {}
impl WherePred {
pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) }
pub fn type_param_list(&self) -> Option<TypeParamList> { support::child(&self.syntax) }
pub fn lifetime_token(&self) -> Option<SyntaxToken> {
support::token(&self.syntax, T![lifetime])
}