diff options
| author | Patrick Walton <[email protected]> | 2011-04-06 10:25:32 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-04-06 10:25:32 -0700 |
| commit | d9da43984b5e9d50f711320d2afc3307537dfb44 (patch) | |
| tree | 6b9b3eefc8909c7621c01b7e039375deb019e7b1 /src/comp/pretty/pprust.rs | |
| parent | rustc: Make type_of() return the type of the wrapper for native functions. li... (diff) | |
| parent | Minimal testcase for next bootstrap blocker. (diff) | |
| download | rust-d9da43984b5e9d50f711320d2afc3307537dfb44.tar.xz rust-d9da43984b5e9d50f711320d2afc3307537dfb44.zip | |
Merge branch 'master' of github.com:graydon/rust
Diffstat (limited to 'src/comp/pretty/pprust.rs')
| -rw-r--r-- | src/comp/pretty/pprust.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs index b0d6fb94..7e0fb6cb 100644 --- a/src/comp/pretty/pprust.rs +++ b/src/comp/pretty/pprust.rs @@ -379,6 +379,11 @@ impure fn print_literal(ps s, @ast.lit lit) { wrd(s.s, common.istr(val as int)); wrd(s.s, common.ty_mach_to_str(mach)); } + case (ast.lit_mach_float(?mach,?val)) { + // val is already a str + wrd(s.s, val); + wrd(s.s, common.ty_mach_to_str(mach)); + } case (ast.lit_nil) {wrd(s.s, "()");} case (ast.lit_bool(?val)) { if (val) {wrd(s.s, "true");} else {wrd(s.s, "false");} @@ -449,9 +454,9 @@ impure fn print_expr(ps s, &@ast.expr expr) { commasep_exprs(s, args); pclose(s); } - case (ast.expr_call_self(?func,?args,_)) { + case (ast.expr_call_self(?ident,?args,_)) { wrd(s.s, "self."); - print_expr(s, func); + print_ident(s, ident); popen(s); commasep_exprs(s, args); pclose(s); @@ -718,6 +723,10 @@ impure fn print_decl(ps s, @ast.decl decl) { end(s.s); } +impure fn print_ident(ps s, ast.ident ident) { + wrd(s.s, ident); +} + impure fn print_for_decl(ps s, @ast.decl decl) { alt (decl.node) { case (ast.decl_local(?loc)) { |