Started adding support for floating-point type, floating-point literals, and logging of floats. Other operations on float probably don't work yet.

This commit is contained in:
Tim Chevalier 2011-03-21 17:12:05 -07:00 committed by Graydon Hoare
parent 35951c92db
commit caa22c9341
9 changed files with 87 additions and 18 deletions

View file

@ -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));