Add HIR Expr machinery

This commit is contained in:
Florian Diebold 2019-01-05 16:32:07 +01:00
parent a6f33b4ca5
commit 136aba1cf3
9 changed files with 542 additions and 4 deletions

View file

@ -378,7 +378,11 @@ impl<R: TreeRoot<RaTypes>> BreakExprNode<R> {
}
impl<'a> BreakExpr<'a> {}
impl<'a> BreakExpr<'a> {
pub fn expr(self) -> Option<Expr<'a>> {
super::child_opt(self)
}
}
// Byte
#[derive(Debug, Clone, Copy,)]
@ -3880,6 +3884,10 @@ impl<'a> StructLit<'a> {
pub fn named_field_list(self) -> Option<NamedFieldList<'a>> {
super::child_opt(self)
}
pub fn spread(self) -> Option<Expr<'a>> {
super::child_opt(self)
}
}
// StructPat