 
         // check if there's only one unnamed parameter that is a closure
         if arguments.isEmpty,
-            let offset = (dictionary["key.offset"] as? Int64).flatMap({ Int($0) }),
-            let totalLength = (dictionary["key.length"] as? Int64).flatMap({ Int($0) }),
-            let nameOffset = (dictionary["key.nameoffset"] as? Int64).flatMap({ Int($0) }),
-            let nameLength = (dictionary["key.namelength"] as? Int64).flatMap({ Int($0) }),
+            let offset = dictionary.offset,
+            let totalLength = dictionary.length,
+            let nameOffset = dictionary.nameOffset,
+            let nameLength = dictionary.nameLength,
             case let start = nameOffset + nameLength,
             case let length = totalLength + offset - start,
             let range = file.contents.bridge().byteRangeToNSRange(start: start, length: length),

    private func filterClosureArguments(_ arguments: [[String: SourceKitRepresentable]],
                                        file: File) -> [[String: SourceKitRepresentable]] {
        return arguments.filter { argument in
            guard let offset = (argument["key.bodyoffset"] as? Int64).flatMap({ Int($0) }),
                let length = (argument["key.bodylength"] as? Int64).flatMap({ Int($0) }),
                let range = file.contents.bridge().byteRangeToNSRange(start: offset, length: length),
                let match = regex("\\s*\\{").firstMatch(in: file.contents, options: [], range: range)?.range,
                match.location == range.location else {

    }

    private func isAlreadyTrailingClosure(dictionary: [String: SourceKitRepresentable], file: File) -> Bool {
        guard let offset = dictionary.offset,
            let length = dictionary.length,
            let text = file.contents.bridge().substringWithByteRange(start: offset, length: length) else {
                return false
        }
