Lower Fn(X, Y) -> Z paths

This commit is contained in:
Florian Diebold 2019-09-07 15:13:05 +02:00
parent 60bdb66ef2
commit d21cdf3c99
4 changed files with 55 additions and 13 deletions

View file

@ -2312,6 +2312,12 @@ impl PathSegment {
pub fn type_arg_list(&self) -> Option<TypeArgList> {
AstChildren::new(&self.syntax).next()
}
pub fn param_list(&self) -> Option<ParamList> {
AstChildren::new(&self.syntax).next()
}
pub fn ret_type(&self) -> Option<RetType> {
AstChildren::new(&self.syntax).next()
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct PathType {

View file

@ -684,7 +684,7 @@ Grammar(
]
),
"PathSegment": (
options: [ "NameRef", "TypeArgList" ]
options: [ "NameRef", "TypeArgList", "ParamList", "RetType" ]
),
"TypeArgList": (collections: [
("type_args", "TypeArg"),