 }
 
 /**
-Replace all UIDs in a SourceKit response dictionary with their string values.
-Also adds keys from cursorinfo requests for declarations.
+Process a SourceKit editor.open response dictionary by removing undocumented tokens with no
+documented children. Add cursor.info information for declarations. Add name to mark comments.
 
 :param: dictionary        `XPCDictionary` to mutate.
 :param: cursorInfoRequest SourceKit xpc dictionary to use to send cursorinfo request.
 :returns: Whether or not the dictionary should be kept.
 */
-func replaceUIDsWithStringsInDictionary(inout dictionary: XPCDictionary,
+func processDictionary(inout dictionary: XPCDictionary,
     _ cursorInfoRequest: xpc_object_t? = nil) -> Bool {
     var shouldKeep = false
     if dictionary["key.substructure"] == nil {

        let offset = dictionary["key.offset"] as Int64
        let length = dictionary["key.length"] as Int64
        let file = String(UTF8String: xpc_dictionary_get_string(cursorInfoRequest, "key.sourcefile"))!
        dictionary["key.name"] = files[file]!.substringWithRange(NSRange(location: Int(offset), length: Int(length)))
        shouldKeep = true
    }
    return shouldKeep

                if (kind.rangeOfString("source.lang.swift.decl.") != nil ||
                    kind == "source.lang.swift.syntaxtype.comment.mark") &&
                    kind != "source.lang.swift.decl.var.parameter" {
                    if processDictionary(&subDict, cursorInfoRequest) {
                        newSubstructure.append(subDict)
                    }
                }
            }
        }
