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

@@ -289,10 +289,18 @@ fn block_from_expr(e: @expr) -> blk {
return spanned {node: blk_, span: e.span};
}
fn default_block(+stmts1: ~[@stmt], expr1: Option<@expr>, id1: node_id) ->
blk_ {
{view_items: ~[], stmts: stmts1,
expr: expr1, id: id1, rules: default_blk}
fn default_block(
+stmts1: ~[@stmt],
expr1: Option<@expr>,
id1: node_id
) -> blk_ {
ast::blk_ {
view_items: ~[],
stmts: stmts1,
expr: expr1,
id: id1,
rules: default_blk,
}
}
fn ident_to_path(s: span, +i: ident) -> @path {