diff options
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 13 | ||||
-rw-r--r-- | crates/ra_syntax/src/grammar.ron | 4 |
2 files changed, 12 insertions, 5 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 31b4e73fb..84f39cda1 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -629,7 +629,11 @@ impl ast::TypeParamsOwner for ConstDef {} | |||
629 | impl ast::AttrsOwner for ConstDef {} | 629 | impl ast::AttrsOwner for ConstDef {} |
630 | impl ast::DocCommentsOwner for ConstDef {} | 630 | impl ast::DocCommentsOwner for ConstDef {} |
631 | impl ast::TypeAscriptionOwner for ConstDef {} | 631 | impl ast::TypeAscriptionOwner for ConstDef {} |
632 | impl ConstDef {} | 632 | impl ConstDef { |
633 | pub fn body(&self) -> Option<&Expr> { | ||
634 | super::child_opt(self) | ||
635 | } | ||
636 | } | ||
633 | 637 | ||
634 | // ContinueExpr | 638 | // ContinueExpr |
635 | #[derive(Debug, PartialEq, Eq, Hash)] | 639 | #[derive(Debug, PartialEq, Eq, Hash)] |
@@ -657,7 +661,6 @@ impl ToOwned for ContinueExpr { | |||
657 | } | 661 | } |
658 | 662 | ||
659 | 663 | ||
660 | |||
661 | impl ContinueExpr {} | 664 | impl ContinueExpr {} |
662 | 665 | ||
663 | // DynTraitType | 666 | // DynTraitType |
@@ -3808,7 +3811,11 @@ impl ast::TypeParamsOwner for StaticDef {} | |||
3808 | impl ast::AttrsOwner for StaticDef {} | 3811 | impl ast::AttrsOwner for StaticDef {} |
3809 | impl ast::DocCommentsOwner for StaticDef {} | 3812 | impl ast::DocCommentsOwner for StaticDef {} |
3810 | impl ast::TypeAscriptionOwner for StaticDef {} | 3813 | impl ast::TypeAscriptionOwner for StaticDef {} |
3811 | impl StaticDef {} | 3814 | impl StaticDef { |
3815 | pub fn body(&self) -> Option<&Expr> { | ||
3816 | super::child_opt(self) | ||
3817 | } | ||
3818 | } | ||
3812 | 3819 | ||
3813 | // Stmt | 3820 | // Stmt |
3814 | #[derive(Debug, PartialEq, Eq, Hash)] | 3821 | #[derive(Debug, PartialEq, Eq, Hash)] |
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index 19e50c9b8..a21c3917d 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron | |||
@@ -313,7 +313,7 @@ Grammar( | |||
313 | "DocCommentsOwner", | 313 | "DocCommentsOwner", |
314 | "TypeAscriptionOwner", | 314 | "TypeAscriptionOwner", |
315 | ], | 315 | ], |
316 | options: ["body","Block"], | 316 | options: [ ["body","Expr"]], |
317 | ), | 317 | ), |
318 | "StaticDef": ( | 318 | "StaticDef": ( |
319 | traits: [ | 319 | traits: [ |
@@ -324,7 +324,7 @@ Grammar( | |||
324 | "DocCommentsOwner", | 324 | "DocCommentsOwner", |
325 | "TypeAscriptionOwner", | 325 | "TypeAscriptionOwner", |
326 | ], | 326 | ], |
327 | options: ["body","Block"], | 327 | options: [ ["body","Expr"]], |
328 | ), | 328 | ), |
329 | "TypeAliasDef": ( | 329 | "TypeAliasDef": ( |
330 | traits: [ | 330 | traits: [ |