aboutsummaryrefslogtreecommitdiff
path: root/src/comp/util/common.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-08-27 16:35:50 -0700
committerGraydon Hoare <[email protected]>2010-08-27 16:35:50 -0700
commit9f0eaa65817303b8768c80454734144c176fda43 (patch)
treedc870780e0ef5b6fe3a3d858d4c6cda31369a22d /src/comp/util/common.rs
parentModify alt-pattern-drop.rs to also insure the slot bound in the pattern doesn... (diff)
downloadrust-9f0eaa65817303b8768c80454734144c176fda43.tar.xz
rust-9f0eaa65817303b8768c80454734144c176fda43.zip
More work on lexer.rs: start using keyword hashtable, handle more lexemes.
Diffstat (limited to 'src/comp/util/common.rs')
-rw-r--r--src/comp/util/common.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/comp/util/common.rs b/src/comp/util/common.rs
index 3089c2c1..51d843b4 100644
--- a/src/comp/util/common.rs
+++ b/src/comp/util/common.rs
@@ -1,18 +1,22 @@
type ty_mach = tag( ty_i8(), ty_i16(), ty_i32(), ty_i64(),
ty_u8(), ty_u16(), ty_u32(), ty_u64(),
- ty_f32(), ty_f16() );
+ ty_f32(), ty_f64() );
fn ty_mach_to_str(ty_mach tm) -> str {
alt (tm) {
case (ty_u8()) { ret "u8"; }
- case (ty_i8()) { ret "i8"; }
case (ty_u16()) { ret "u16"; }
- case (ty_i16()) { ret "i16"; }
case (ty_u32()) { ret "u32"; }
- case (ty_i32()) { ret "i32"; }
case (ty_u64()) { ret "u64"; }
+
+ case (ty_i8()) { ret "i8"; }
+ case (ty_i16()) { ret "i16"; }
+ case (ty_i32()) { ret "i32"; }
case (ty_i64()) { ret "i64"; }
+
+ case (ty_f32()) { ret "f32"; }
+ case (ty_f64()) { ret "f64"; }
}
}