about summary refs log tree commit diff
path: root/src/comp/pretty
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2011-03-21 17:12:05 -0700
committerGraydon Hoare <graydon@mozilla.com>2011-03-21 18:10:34 -0700
commitcaa22c93415bb106bced82bbabc3d9ffbef7e69c (patch)
tree2a77dc7cfb33c82dcdc83a69a423ebc4340e576e /src/comp/pretty
parent35951c92dbc1bb2eeb94f7951b6186ce8239fc41 (diff)
downloadrust-caa22c93415bb106bced82bbabc3d9ffbef7e69c.tar.gz
rust-caa22c93415bb106bced82bbabc3d9ffbef7e69c.zip
Started adding support for floating-point type, floating-point literals, and logging of floats. Other operations on float probably don't work yet.
Diffstat (limited to 'src/comp/pretty')
-rw-r--r--src/comp/pretty/pprust.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs
index 7863f3e7b9a..0e30ced131d 100644
--- a/src/comp/pretty/pprust.rs
+++ b/src/comp/pretty/pprust.rs
@@ -283,6 +283,9 @@ impure fn print_literal(ps s, @ast.lit lit) {
     case (ast.lit_uint(?val)) { // TODO clipping? uistr?
       wrd(s, util.common.istr(val as int) + "u");
     }
+    case (ast.lit_float(?fstr)) {
+      wrd(s, fstr);
+    }
     case (ast.lit_mach_int(?mach,?val)) {
       wrd(s, util.common.istr(val as int));
       wrd(s, util.common.ty_mach_to_str(mach));