aboutsummaryrefslogtreecommitdiff
path: root/src/comp/pretty
diff options
context:
space:
mode:
authorLindsey Kuper <[email protected]>2011-04-01 17:48:47 -0700
committerGraydon Hoare <[email protected]>2011-04-05 11:55:14 -0700
commit361ee5a68bf23c9fc65aee39618b5d1b0db4941b (patch)
tree89820b619d2f61cb47a3b926245d7fd7614cad3e /src/comp/pretty
parentKnocking out a quick fixme: pretty-printing exprs in error messages. (diff)
downloadrust-361ee5a68bf23c9fc65aee39618b5d1b0db4941b.tar.xz
rust-361ee5a68bf23c9fc65aee39618b5d1b0db4941b.zip
Oops -- if we're going to use the pretty-printer, we need it to work.
Diffstat (limited to 'src/comp/pretty')
-rw-r--r--src/comp/pretty/pprust.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs
index b0d6fb94..28f64c89 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");}