aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2018-12-25 12:54:38 +0000
committerFlorian Diebold <[email protected]>2018-12-25 14:16:42 +0000
commit55c941cd9fb90c9340f01981e113aabd058b185b (patch)
treef07828a8eaabab7c20b2b4d3b98519956b981f17 /crates/ra_syntax
parent07a72859650254d8ba326e2c9683ae52164cb3b5 (diff)
Type field accesses
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/ast/generated.rs10
-rw-r--r--crates/ra_syntax/src/grammar.ron2
2 files changed, 10 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs
index 35a9770a6..4e0550487 100644
--- a/crates/ra_syntax/src/ast/generated.rs
+++ b/crates/ra_syntax/src/ast/generated.rs
@@ -1123,7 +1123,15 @@ impl<R: TreeRoot<RaTypes>> FieldExprNode<R> {
1123} 1123}
1124 1124
1125 1125
1126impl<'a> FieldExpr<'a> {} 1126impl<'a> FieldExpr<'a> {
1127 pub fn expr(self) -> Option<Expr<'a>> {
1128 super::child_opt(self)
1129 }
1130
1131 pub fn name_ref(self) -> Option<NameRef<'a>> {
1132 super::child_opt(self)
1133 }
1134}
1127 1135
1128// FieldPatList 1136// FieldPatList
1129#[derive(Debug, Clone, Copy,)] 1137#[derive(Debug, Clone, Copy,)]
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron
index e4e41d077..923da0324 100644
--- a/crates/ra_syntax/src/grammar.ron
+++ b/crates/ra_syntax/src/grammar.ron
@@ -406,7 +406,7 @@ Grammar(
406 options: [ "Expr" ], 406 options: [ "Expr" ],
407 ), 407 ),
408 "IndexExpr": (), 408 "IndexExpr": (),
409 "FieldExpr": (), 409 "FieldExpr": (options: ["Expr", "NameRef"]),
410 "TryExpr": (options: ["Expr"]), 410 "TryExpr": (options: ["Expr"]),
411 "CastExpr": (options: ["Expr", "TypeRef"]), 411 "CastExpr": (options: ["Expr", "TypeRef"]),
412 "RefExpr": (options: ["Expr"]), 412 "RefExpr": (options: ["Expr"]),