convert ast::blk_ into a struct

This commit is contained in:
Erick Tryzelaar
2013-01-14 19:35:08 -08:00
parent 0b9e23146b
commit 3ea3136e84
8 changed files with 108 additions and 65 deletions

View File

@@ -193,11 +193,13 @@ impl ext_ctxt: ext_ctxt_ast_builder {
}
fn block(+stmts: ~[@ast::stmt], e: @ast::expr) -> ast::blk {
let blk = {view_items: ~[],
stmts: stmts,
expr: Some(e),
id: self.next_id(),
rules: ast::default_blk};
let blk = ast::blk_ {
view_items: ~[],
stmts: stmts,
expr: Some(e),
id: self.next_id(),
rules: ast::default_blk,
};
spanned { node: blk, span: dummy_sp() }
}