diff options
| author | Tim Chevalier <[email protected]> | 2011-03-22 17:25:40 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-22 17:31:27 -0700 |
| commit | 23e23bd762a4b5a14ff2abcbabfd2349621a3dbe (patch) | |
| tree | a0ff672d10f7a87a22d1eb047632f3b96dfe5317 /src/comp/front/parser.rs | |
| parent | stdlib: Add EBML writing functionality (diff) | |
| download | rust-23e23bd762a4b5a14ff2abcbabfd2349621a3dbe.tar.xz rust-23e23bd762a4b5a14ff2abcbabfd2349621a3dbe.zip | |
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).
Diffstat (limited to 'src/comp/front/parser.rs')
| -rw-r--r-- | src/comp/front/parser.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index f1f8a918..9e13e706 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -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); |