diff options
author | Florian Diebold <[email protected]> | 2019-01-05 15:32:07 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-01-05 21:41:12 +0000 |
commit | 136aba1cf32646278c4034541ee415f656f8bb5e (patch) | |
tree | c15e7be7bfdae8074aa42f0c216e315bf8d7db49 /crates/ra_syntax/src/ast | |
parent | a6f33b4ca5e70a056c60b24cb8cb3283d8209624 (diff) |
Add HIR Expr machinery
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r-- | crates/ra_syntax/src/ast/generated.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 7df6a9c46..deb4dea88 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -378,7 +378,11 @@ impl<R: TreeRoot<RaTypes>> BreakExprNode<R> { | |||
378 | } | 378 | } |
379 | 379 | ||
380 | 380 | ||
381 | impl<'a> BreakExpr<'a> {} | 381 | impl<'a> BreakExpr<'a> { |
382 | pub fn expr(self) -> Option<Expr<'a>> { | ||
383 | super::child_opt(self) | ||
384 | } | ||
385 | } | ||
382 | 386 | ||
383 | // Byte | 387 | // Byte |
384 | #[derive(Debug, Clone, Copy,)] | 388 | #[derive(Debug, Clone, Copy,)] |
@@ -3880,6 +3884,10 @@ impl<'a> StructLit<'a> { | |||
3880 | pub fn named_field_list(self) -> Option<NamedFieldList<'a>> { | 3884 | pub fn named_field_list(self) -> Option<NamedFieldList<'a>> { |
3881 | super::child_opt(self) | 3885 | super::child_opt(self) |
3882 | } | 3886 | } |
3887 | |||
3888 | pub fn spread(self) -> Option<Expr<'a>> { | ||
3889 | super::child_opt(self) | ||
3890 | } | ||
3883 | } | 3891 | } |
3884 | 3892 | ||
3885 | // StructPat | 3893 | // StructPat |