aboutsummaryrefslogtreecommitdiff
path: root/src/comp/pretty
diff options
context:
space:
mode:
authorLindsey Kuper <[email protected]>2011-04-07 13:49:27 -0700
committerGraydon Hoare <[email protected]>2011-04-07 14:26:34 -0700
commit1092bbfff0cf932ef14e5b92cd54133571ca4727 (patch)
treea771667972fb8f75d393372032d5f05c03b3b68d /src/comp/pretty
parentAdd a very basic crate-dump utility (diff)
downloadrust-1092bbfff0cf932ef14e5b92cd54133571ca4727.tar.xz
rust-1092bbfff0cf932ef14e5b92cd54133571ca4727.zip
Support for self-calls that take arguments.
Nicer parsing of self-calls (expr_self_method nodes inside expr_call nodes, rather than a separate expr_call_self) makes typechecking tractable. We can now write self-calls that take arguments and return values (see: test/run-pass/obj-self-*.rs).
Diffstat (limited to 'src/comp/pretty')
-rw-r--r--src/comp/pretty/pprust.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs
index ee11a43a..d560fe5b 100644
--- a/src/comp/pretty/pprust.rs
+++ b/src/comp/pretty/pprust.rs
@@ -454,12 +454,9 @@ impure fn print_expr(ps s, &@ast.expr expr) {
commasep_exprs(s, args);
pclose(s);
}
- case (ast.expr_call_self(?ident,?args,_)) {
+ case (ast.expr_self_method(?ident,_)) {
wrd(s.s, "self.");
print_ident(s, ident);
- popen(s);
- commasep_exprs(s, args);
- pclose(s);
}
case (ast.expr_bind(?func,?args,_)) {
impure fn print_opt(ps s, &option.t[@ast.expr] expr) {