diff options
| author | Tim Chevalier <[email protected]> | 2011-03-21 17:12:05 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-21 18:10:34 -0700 |
| commit | caa22c93415bb106bced82bbabc3d9ffbef7e69c (patch) | |
| tree | 2a77dc7cfb33c82dcdc83a69a423ebc4340e576e /src/comp/middle/ty.rs | |
| parent | Support CFG_LLVM_ROOT since CMake-built LLVM has no llvm-config (diff) | |
| download | rust-caa22c93415bb106bced82bbabc3d9ffbef7e69c.tar.xz 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/middle/ty.rs')
| -rw-r--r-- | src/comp/middle/ty.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs index c6fbb5bf..bf525679 100644 --- a/src/comp/middle/ty.rs +++ b/src/comp/middle/ty.rs @@ -32,6 +32,7 @@ tag sty { ty_nil; ty_bool; ty_int; + ty_float; ty_uint; ty_machine(util.common.ty_mach); ty_char; @@ -162,6 +163,7 @@ fn ty_to_str(&@t typ) -> str { case (ty_nil) { s += "()"; } case (ty_bool) { s += "bool"; } case (ty_int) { s += "int"; } + case (ty_float) { s += "float"; } case (ty_uint) { s += "uint"; } case (ty_machine(?tm)) { s += common.ty_mach_to_str(tm); } case (ty_char) { s += "char"; } @@ -418,6 +420,7 @@ fn type_is_scalar(@t ty) -> bool { case (ty_nil) { ret true; } case (ty_bool) { ret true; } case (ty_int) { ret true; } + case (ty_float) { ret true; } case (ty_uint) { ret true; } case (ty_machine(_)) { ret true; } case (ty_char) { ret true; } |