     }
 
     private func readNext() -> UnicodeScalar? {
+        previous = current
         current = iterator.next()
         return current
     }


    fileprivate func readDigit(_ hasDot: inout Bool) -> UnicodeScalar? {
        if let ch = readNext() {
            if (ch >= "0" && ch <= "9") {
                return ch
            } else if (ch == "." && !hasDot) {
                hasDot = true

    
    private let input: String
    private var current: UnicodeScalar?
    private var previous: UnicodeScalar?
    private var iterator: String.UnicodeScalarView.Iterator

    init(input: String) {
