diff options
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 10 | ||||
-rw-r--r-- | crates/ra_syntax/src/grammar.ron | 2 |
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 | ||
1126 | impl<'a> FieldExpr<'a> {} | 1126 | impl<'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"]), |