                 case .initial: fallthrough
                 case .value:
                     let _ = generator.next()        // eat the '}'
-                    return JSValue(object)
+                    return JSValue(dict)
 
                 default:
                     let info = [

        case value
    }

    static func parseObject(_ generator: ReplayableGenerator) throws -> JSValue {
        var state = ObjectParsingState.initial

        var key = ""
        var object = [String:JSValue]()

        for (idx, codeunit) in generator.enumerated() {
            switch (idx, codeunit) {

                    state = .value

                    let value = try parse(generator)
                    dict[key] = value
                    generator.replay()

                default:
