         case Char(ascii: "0"):
             advance()
         case Char(ascii: "1") ... Char(ascii: "9"):
-            for ; cur != end; advance() {
-                if let value = digitToInt(currentChar) {
-                    integer = (integer * 10) + Int64(value)
-                } else {
-                    break
-                }
+            while let value = digitToInt(currentChar) where cur != end {
+                integer = (integer * 10) + Int64(value)
+                advance()
             }
         default:
             throw InvalidNumberError("invalid token in number", self)
         }
 
-        if integer != Int64(Double(integer)) {
-            // TODO
-            //return .Error(InvalidNumberError("too much integer part in number", self))
+        if integer != Int64(Float80(integer)) {
+            // TODO: Verify implications of Float80
+            throw InvalidNumberError("too much integer part in number", self)
         }
 
         var fraction: Double = 0.0

            exponent = 0

            var exponentLength = 0
            for ; cur != end; advance() {
                if let value = digitToInt(currentChar) {
                    exponent = (exponent * 10) + Int64(value)
                    exponentLength++
                } else {
                    break
                }
            }
            if exponentLength == 0 {
                throw InvalidNumberError("insufficient exponent part in number", self)
            }

            exponent *= expSign
        }

        //println("nuber: \(sign) * (\(integer) + \(fraction)) * pow(10, \(exponent))")
        return .NumberValue(sign * (Double(integer) + fraction) * pow(10, Double(exponent)))
    }


            var factor = 0.1
            var fractionLength = 0

            while let value = digitToInt(currentChar) where cur != end {
                fraction += (Double(value) * factor)
                factor /= 10
                fractionLength++
                
                advance()
            }

            guard fractionLength != 0 else {
                throw InvalidNumberError("insufficient fraction part in number", self)
            }
        }
