diff options
Diffstat (limited to 'crates/libsyntax2/src/ast/generated.rs')
-rw-r--r-- | crates/libsyntax2/src/ast/generated.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/ast/generated.rs b/crates/libsyntax2/src/ast/generated.rs index 6926c0535..b937fe5a2 100644 --- a/crates/libsyntax2/src/ast/generated.rs +++ b/crates/libsyntax2/src/ast/generated.rs | |||
@@ -383,6 +383,24 @@ impl<'a> AstNode<'a> for Expr<'a> { | |||
383 | 383 | ||
384 | impl<'a> Expr<'a> {} | 384 | impl<'a> Expr<'a> {} |
385 | 385 | ||
386 | // ExprStmt | ||
387 | #[derive(Debug, Clone, Copy)] | ||
388 | pub struct ExprStmt<'a> { | ||
389 | syntax: SyntaxNodeRef<'a>, | ||
390 | } | ||
391 | |||
392 | impl<'a> AstNode<'a> for ExprStmt<'a> { | ||
393 | fn cast(syntax: SyntaxNodeRef<'a>) -> Option<Self> { | ||
394 | match syntax.kind() { | ||
395 | EXPR_STMT => Some(ExprStmt { syntax }), | ||
396 | _ => None, | ||
397 | } | ||
398 | } | ||
399 | fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax } | ||
400 | } | ||
401 | |||
402 | impl<'a> ExprStmt<'a> {} | ||
403 | |||
386 | // FieldExpr | 404 | // FieldExpr |
387 | #[derive(Debug, Clone, Copy)] | 405 | #[derive(Debug, Clone, Copy)] |
388 | pub struct FieldExpr<'a> { | 406 | pub struct FieldExpr<'a> { |
@@ -442,6 +460,10 @@ impl<'a> FnDef<'a> { | |||
442 | pub fn param_list(self) -> Option<ParamList<'a>> { | 460 | pub fn param_list(self) -> Option<ParamList<'a>> { |
443 | super::child_opt(self) | 461 | super::child_opt(self) |
444 | } | 462 | } |
463 | |||
464 | pub fn body(self) -> Option<Block<'a>> { | ||
465 | super::child_opt(self) | ||
466 | } | ||
445 | } | 467 | } |
446 | 468 | ||
447 | // FnPointerType | 469 | // FnPointerType |
@@ -626,6 +648,10 @@ impl<'a> LetStmt<'a> { | |||
626 | pub fn pat(self) -> Option<Pat<'a>> { | 648 | pub fn pat(self) -> Option<Pat<'a>> { |
627 | super::child_opt(self) | 649 | super::child_opt(self) |
628 | } | 650 | } |
651 | |||
652 | pub fn initializer(self) -> Option<Expr<'a>> { | ||
653 | super::child_opt(self) | ||
654 | } | ||
629 | } | 655 | } |
630 | 656 | ||
631 | // LoopExpr | 657 | // LoopExpr |