             yaml_parser_set_input_string(&parser, input, bytes.count - 1)
         }
 #endif
-        try expectNextEvent(is: [YAML_STREAM_START_EVENT])
+        try expectNextEvent(oneOf: [YAML_STREAM_START_EVENT])
     }
 
     deinit {

        return string(from: event.data.scalar.anchor)
    }
    var scalarTag: String? {
        return (event.data.scalar.plain_implicit != 0 || event.data.scalar.quoted_implicit != 0)
            ? nil : string(from: event.data.scalar.tag)
    }
    var scalarValue: String {
        // scalar may contain NULL characters

    }

    @discardableResult
    fileprivate func expectNextEvent(oneOf eventTypes: [yaml_event_type_t]) throws -> yaml_event_type_t {
        let event = try parse()
        guard eventTypes.contains(event.type) else {
            throw ParserError.unexpectedEvent(event.type.rawValue)
