1
Fork 0

Make uses of self in impls compile

Get rid of expr_self_call, introduces def_self. `self` is now,
syntactically, simply a variable. A method implicitly brings a `self`
binding into scope.

Issue #1227
This commit is contained in:
Marijn Haverbeke 2011-12-14 15:23:11 +01:00
parent 1dd2f1ec03
commit 7efef98901
17 changed files with 137 additions and 203 deletions

View file

@ -353,7 +353,6 @@ fn noop_fold_expr(e: expr_, fld: ast_fold) -> expr_ {
expr_call(fld.fold_expr(f), fld.map_exprs(fld.fold_expr, args),
blk)
}
expr_self_method(id) { expr_self_method(fld.fold_ident(id)) }
expr_bind(f, args) {
let opt_map_se = bind option::map(fld.fold_expr, _);
expr_bind(fld.fold_expr(f), vec::map(opt_map_se, args))