rm obsolete for support from the compiler
This commit is contained in:
parent
1008945528
commit
e7bb33aed8
20 changed files with 15 additions and 323 deletions
|
|
@ -472,11 +472,6 @@ pub enum expr_ {
|
|||
expr_loop(Block, Option<ident>),
|
||||
expr_match(@expr, ~[arm]),
|
||||
expr_fn_block(fn_decl, Block),
|
||||
// Inner expr is always an expr_fn_block. We need the wrapping node to
|
||||
// easily type this (a function returning nil on the inside but bool on
|
||||
// the outside).
|
||||
expr_loop_body(@expr),
|
||||
// Like expr_loop_body but for 'do' blocks
|
||||
expr_do_body(@expr),
|
||||
expr_block(Block),
|
||||
|
||||
|
|
|
|||
|
|
@ -541,7 +541,6 @@ pub fn noop_fold_expr(e: &expr_, fld: @ast_fold) -> expr_ {
|
|||
fld.fold_expr(ohs)
|
||||
)
|
||||
}
|
||||
expr_loop_body(f) => expr_loop_body(fld.fold_expr(f)),
|
||||
expr_do_body(f) => expr_do_body(fld.fold_expr(f)),
|
||||
expr_lit(_) => (*e).clone(),
|
||||
expr_cast(expr, ref ty) => {
|
||||
|
|
|
|||
|
|
@ -501,7 +501,7 @@ pub fn visit_expr<E:Clone>(ex: @expr, (e, v): (E, vt<E>)) {
|
|||
(v.visit_expr)(b, (e.clone(), v));
|
||||
}
|
||||
expr_addr_of(_, x) | expr_unary(_, _, x) |
|
||||
expr_loop_body(x) | expr_do_body(x) => (v.visit_expr)(x, (e.clone(), v)),
|
||||
expr_do_body(x) => (v.visit_expr)(x, (e.clone(), v)),
|
||||
expr_lit(_) => (),
|
||||
expr_cast(x, ref t) => {
|
||||
(v.visit_expr)(x, (e.clone(), v));
|
||||
|
|
|
|||
|
|
@ -1087,7 +1087,7 @@ pub fn print_call_post(s: @ps,
|
|||
nbsp(s);
|
||||
match blk.get().node {
|
||||
// need to handle closures specifically
|
||||
ast::expr_do_body(e) | ast::expr_loop_body(e) => {
|
||||
ast::expr_do_body(e) => {
|
||||
end(s); // we close our head box; closure
|
||||
// will create it's own.
|
||||
print_expr(s, e);
|
||||
|
|
@ -1338,9 +1338,6 @@ pub fn print_expr(s: @ps, expr: &ast::expr) {
|
|||
// empty box to satisfy the close.
|
||||
ibox(s, 0);
|
||||
}
|
||||
ast::expr_loop_body(body) => {
|
||||
print_expr(s, body);
|
||||
}
|
||||
ast::expr_do_body(body) => {
|
||||
print_expr(s, body);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -513,7 +513,6 @@ pub fn visit_expr<E:Clone>(visitor: @Visitor<E>, expression: @expr, env: E) {
|
|||
}
|
||||
expr_addr_of(_, subexpression) |
|
||||
expr_unary(_, _, subexpression) |
|
||||
expr_loop_body(subexpression) |
|
||||
expr_do_body(subexpression) => {
|
||||
visitor.visit_expr(subexpression, env.clone())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue