From d21cdf3c998bb24e48e81a7e6909df2146ce097c Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 7 Sep 2019 15:13:05 +0200 Subject: Lower `Fn(X, Y) -> Z` paths --- crates/ra_syntax/src/ast/generated.rs | 6 ++++++ crates/ra_syntax/src/grammar.ron | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'crates/ra_syntax') diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index bcf753f78..d274b6fbc 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs @@ -2312,6 +2312,12 @@ impl PathSegment { pub fn type_arg_list(&self) -> Option { AstChildren::new(&self.syntax).next() } + pub fn param_list(&self) -> Option { + AstChildren::new(&self.syntax).next() + } + pub fn ret_type(&self) -> Option { + AstChildren::new(&self.syntax).next() + } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct PathType { diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index 3e6c2d3f3..993e58e64 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron @@ -684,7 +684,7 @@ Grammar( ] ), "PathSegment": ( - options: [ "NameRef", "TypeArgList" ] + options: [ "NameRef", "TypeArgList", "ParamList", "RetType" ] ), "TypeArgList": (collections: [ ("type_args", "TypeArg"), -- cgit v1.2.3