summary refs log tree commit diff
path: root/src/comp/front/parser.rs
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/front/parser.rs
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/front/parser.rs')
-rw-r--r--src/comp/front/parser.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs
index 9d3724f9de1..f1f8a91887f 100644
--- a/src/comp/front/parser.rs
+++ b/src/comp/front/parser.rs
@@ -537,6 +537,10 @@ impure fn parse_lit(parser p) -> ast.lit {
             p.bump();
             lit = ast.lit_uint(u);
         }
+        case (token.LIT_FLOAT(?s)) {
+            p.bump();
+            lit = ast.lit_float(s);
+        }
         case (token.LIT_MACH_INT(?tm, ?i)) {
             p.bump();
             lit = ast.lit_mach_int(tm, i);