From 136aba1cf32646278c4034541ee415f656f8bb5e Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 5 Jan 2019 16:32:07 +0100 Subject: Add HIR Expr machinery --- crates/ra_syntax/src/ast/generated.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'crates/ra_syntax/src/ast') 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> BreakExprNode { } -impl<'a> BreakExpr<'a> {} +impl<'a> BreakExpr<'a> { + pub fn expr(self) -> Option> { + super::child_opt(self) + } +} // Byte #[derive(Debug, Clone, Copy,)] @@ -3880,6 +3884,10 @@ impl<'a> StructLit<'a> { pub fn named_field_list(self) -> Option> { super::child_opt(self) } + + pub fn spread(self) -> Option> { + super::child_opt(self) + } } // StructPat -- cgit v1.2.3