func removeDeadDecls()

in Sources/SwiftCodeSanKit/FileUpdaters/DeclUpdater.swift [42:57]


    func removeDeadDecls(filesToDecls: [String: [DeclMetadata]],
                         completion: @escaping (String, String) -> ()) {
        scan(filesToDecls) { (path, decls, lock) in
            do {
                let node = try SyntaxParser.parse(path)
                let remover = DeclRemover(path, decls: decls)
                let ret = remover.visit(node)

                lock?.lock()
                completion(path, ret.description)
                lock?.unlock()
            }  catch {
                fatalError(error.localizedDescription)
            }
        }
    }