aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/ast/generated.rs13
-rw-r--r--crates/ra_syntax/src/grammar.ron4
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 {}
629impl ast::AttrsOwner for ConstDef {} 629impl ast::AttrsOwner for ConstDef {}
630impl ast::DocCommentsOwner for ConstDef {} 630impl ast::DocCommentsOwner for ConstDef {}
631impl ast::TypeAscriptionOwner for ConstDef {} 631impl ast::TypeAscriptionOwner for ConstDef {}
632impl ConstDef {} 632impl 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
661impl ContinueExpr {} 664impl ContinueExpr {}
662 665
663// DynTraitType 666// DynTraitType
@@ -3808,7 +3811,11 @@ impl ast::TypeParamsOwner for StaticDef {}
3808impl ast::AttrsOwner for StaticDef {} 3811impl ast::AttrsOwner for StaticDef {}
3809impl ast::DocCommentsOwner for StaticDef {} 3812impl ast::DocCommentsOwner for StaticDef {}
3810impl ast::TypeAscriptionOwner for StaticDef {} 3813impl ast::TypeAscriptionOwner for StaticDef {}
3811impl StaticDef {} 3814impl 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: [