Add missing members generates indented blocks

This commit is contained in:
Aleksey Kladov 2020-05-02 11:50:43 +02:00
parent b58dfd24f1
commit b73dbbfbf2
4 changed files with 122 additions and 88 deletions

View file

@ -82,14 +82,6 @@ pub fn block_expr(
ast_from_text(&format!("fn f() {}", buf))
}
pub fn block_from_expr(e: ast::Expr) -> ast::BlockExpr {
return from_text(&format!("{{ {} }}", e));
fn from_text(text: &str) -> ast::BlockExpr {
ast_from_text(&format!("fn f() {}", text))
}
}
pub fn expr_unit() -> ast::Expr {
expr_from_text("()")
}