2010-08-18 13:34:47 -05:00
|
|
|
|
|
|
|
type ty_mach = tag( ty_i8(), ty_i16(), ty_i32(), ty_i64(),
|
|
|
|
ty_u8(), ty_u16(), ty_u32(), ty_u64(),
|
2010-08-27 19:29:56 -05:00
|
|
|
ty_f32(), ty_f16() );
|
2010-08-18 13:34:47 -05:00
|
|
|
|
2010-08-20 13:41:34 -05:00
|
|
|
fn ty_mach_to_str(ty_mach tm) -> str {
|
|
|
|
alt (tm) {
|
|
|
|
case (ty_u8()) { ret "u8"; }
|
2010-08-27 18:35:50 -05:00
|
|
|
case (ty_i8()) { ret "i8"; }
|
2010-08-27 19:29:56 -05:00
|
|
|
case (ty_u16()) { ret "u16"; }
|
2010-08-27 18:35:50 -05:00
|
|
|
case (ty_i16()) { ret "i16"; }
|
2010-08-27 19:29:56 -05:00
|
|
|
case (ty_u32()) { ret "u32"; }
|
2010-08-27 18:35:50 -05:00
|
|
|
case (ty_i32()) { ret "i32"; }
|
2010-08-27 19:29:56 -05:00
|
|
|
case (ty_u64()) { ret "u64"; }
|
2010-08-20 13:41:34 -05:00
|
|
|
case (ty_i64()) { ret "i64"; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-08-18 13:34:47 -05:00
|
|
|
//
|
|
|
|
// Local Variables:
|
|
|
|
// mode: rust
|
|
|
|
// fill-column: 78;
|
|
|
|
// indent-tabs-mode: nil
|
|
|
|
// c-basic-offset: 4
|
|
|
|
// buffer-file-coding-system: utf-8-unix
|
|
|
|
// compile-command: "make -k -C ../.. 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
|
|
|
|
// End:
|
|
|
|
//
|