From 1092bbfff0cf932ef14e5b92cd54133571ca4727 Mon Sep 17 00:00:00 2001 From: Lindsey Kuper Date: Thu, 7 Apr 2011 13:49:27 -0700 Subject: 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). --- src/comp/pretty/pprust.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/comp/pretty') 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) { -- cgit v1.2.3