aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-09-16 13:43:21 +0100
committerGitHub <[email protected]>2019-09-16 13:43:21 +0100
commitba583091e60553633dd3cc9ab37a1d9f64827a1e (patch)
tree41a9b72f46b1119ff32964f77365459fdb46a37d /crates/ra_syntax/src
parent6b33b90091b0cecd4c092d34451aba9f2492063c (diff)
parent7ed3be32916facf3b709d5277381408cd3ec134a (diff)
Merge #1817
1817: Support path starting with a type r=matklad a=uHOOCCOOHu The path syntax `<Ty>::foo` Co-authored-by: uHOOCCOOHu <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/ast/generated.rs3
-rw-r--r--crates/ra_syntax/src/grammar.ron2
2 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs
index 591ac8ca3..dc1f8c82c 100644
--- a/crates/ra_syntax/src/ast/generated.rs
+++ b/crates/ra_syntax/src/ast/generated.rs
@@ -2385,6 +2385,9 @@ impl PathSegment {
2385 pub fn ret_type(&self) -> Option<RetType> { 2385 pub fn ret_type(&self) -> Option<RetType> {
2386 AstChildren::new(&self.syntax).next() 2386 AstChildren::new(&self.syntax).next()
2387 } 2387 }
2388 pub fn path_type(&self) -> Option<PathType> {
2389 AstChildren::new(&self.syntax).next()
2390 }
2388} 2391}
2389#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2392#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2390pub struct PathType { 2393pub struct PathType {
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron
index 08cc6eeea..da9de2214 100644
--- a/crates/ra_syntax/src/grammar.ron
+++ b/crates/ra_syntax/src/grammar.ron
@@ -689,7 +689,7 @@ Grammar(
689 ] 689 ]
690 ), 690 ),
691 "PathSegment": ( 691 "PathSegment": (
692 options: [ "NameRef", "TypeArgList", "ParamList", "RetType" ] 692 options: [ "NameRef", "TypeArgList", "ParamList", "RetType", "PathType" ]
693 ), 693 ),
694 "TypeArgList": (collections: [ 694 "TypeArgList": (collections: [
695 ("type_args", "TypeArg"), 695 ("type_args", "TypeArg"),