             case (_, Token.E, .integer): fallthrough
             case (_, Token.e, .fractional): fallthrough
             case (_, Token.E, .fractional):
-                numberStorage.append(codeunit)
                 state = .exponent
 
-            case (_, Token.Minus, .exponent): fallthrough
+            case (_, Token.Minus, .exponent):
+                exponentSign = -1
+                state = .exponentSign
+
             case (_, Token.Plus, .exponent):
-                numberStorage.append(codeunit)
                 state = .exponentSign
             
             case (_, Token.Zero...Token.Nine, .exponent): fallthrough
             case (_, Token.Zero...Token.Nine, .exponentSign): fallthrough
             case (_, Token.Zero...Token.Nine, .exponentDigits):
-                numberStorage.append(codeunit)
+                exponent = exponent * 10 + Double(codeunit - Token.Zero)
                 state = .exponentDigits
 
             case (_, Token.Period, .leadingZero): fallthrough
             case (_, Token.Period, .integer):
-                numberStorage.append(codeunit)
                 state = .decimal
 
             default:

                throw JsonParserError(code: ErrorCode.ParsingError.code, domain: JSValueErrorDomain, userInfo: info)

            case (_, Token.Zero, .initial):
                numberStorage.append(codeunit)
                state = .leadingZero

            case (_, Token.Zero, .leadingNegativeSign):
                numberStorage.append(codeunit)
                state = .leadingZero

            case (_, Token.Zero...Token.Nine, .leadingZero):

        case exponentDigits
    }

    static func parseNumber(_ generator: ReplayableGenerator) throws -> JSValue {
        // The https://tools.ietf.org/html/rfc7159 spec for numbers.
        //    number = [ minus ] int [ frac ] [ exp ]
