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

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