syntax: convert ast::spanned into a struct

This commit is contained in:
Erick Tryzelaar
2012-12-27 14:36:00 -05:00
parent b75550af5c
commit 93c2ebf994
31 changed files with 245 additions and 210 deletions

View File

@@ -176,12 +176,15 @@ fn map_fn(fk: visit::fn_kind, decl: fn_decl, body: blk,
cx.local_id += 1u;
}
match fk {
visit::fk_dtor(tps, ref attrs, self_id, parent_id) => {
let dt = @{node: {id: id, attrs: (*attrs), self_id: self_id,
body: /* FIXME (#2543) */ copy body}, span: sp};
cx.map.insert(id, node_dtor(/* FIXME (#2543) */ copy tps, dt,
parent_id,
@/* FIXME (#2543) */ copy cx.path));
visit::fk_dtor(tps, ref attrs, self_id, parent_id) => {
let dt = @spanned {
node: {id: id, attrs: (*attrs), self_id: self_id,
body: /* FIXME (#2543) */ copy body},
span: sp,
};
cx.map.insert(id, node_dtor(/* FIXME (#2543) */ copy tps, dt,
parent_id,
@/* FIXME (#2543) */ copy cx.path));
}
_ => ()
}