about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/lexer.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs
index 381183e736c..0f672d1de81 100644
--- a/src/libsyntax/parse/lexer.rs
+++ b/src/libsyntax/parse/lexer.rs
@@ -431,6 +431,13 @@ fn scan_number(c: char, rdr: string_reader) -> token::Token {
         let dec_part = scan_digits(rdr, 10u);
         num_str += ~"." + dec_part;
     }
+    if is_float {
+        match base {
+          16u => rdr.fatal(~"hexadecimal float literal is not supported"),
+          2u => rdr.fatal(~"binary float literal is not supported"),
+          _ => ()
+        }
+    }
     match scan_exponent(rdr) {
       Some(ref s) => {
         is_float = true;