Infer box expression

This commit is contained in:
uHOOCCOOHu 2019-09-11 23:53:41 +08:00
parent 6ce6744e18
commit 8c078a0164
No known key found for this signature in database
GPG key ID: CED392DE0C483D00
7 changed files with 107 additions and 4 deletions

View file

@ -389,6 +389,10 @@ where
let exprs = e.exprs().map(|expr| self.collect_expr(expr)).collect();
self.alloc_expr(Expr::Tuple { exprs }, syntax_ptr)
}
ast::Expr::BoxExpr(e) => {
let expr = self.collect_expr_opt(e.expr());
self.alloc_expr(Expr::Box { expr }, syntax_ptr)
}
ast::Expr::ArrayExpr(e) => {
let kind = e.kind();