Further support for floating-point. Literals with exponents work
and literals with the 'f32' or 'f64' suffixes work as well. In addition, logging things with the f32 or f64 type works. (float is still assumed to be a synonym for f64).
This commit is contained in:
parent
d56971d5b4
commit
23e23bd762
10 changed files with 153 additions and 26 deletions
|
@ -545,6 +545,10 @@ impure fn parse_lit(parser p) -> ast.lit {
|
|||
p.bump();
|
||||
lit = ast.lit_mach_int(tm, i);
|
||||
}
|
||||
case (token.LIT_MACH_FLOAT(?tm, ?s)) {
|
||||
p.bump();
|
||||
lit = ast.lit_mach_float(tm, s);
|
||||
}
|
||||
case (token.LIT_CHAR(?c)) {
|
||||
p.bump();
|
||||
lit = ast.lit_char(c);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue