func updateAccessLevels()

in Sources/SwiftCodeSanKit/FileUpdaters/DeclUpdater.swift [24:40]


    func updateAccessLevels(filesToDecls: [String: [DeclMetadata]],
                            filesToModules: [String: String],
                            completion: @escaping (String, String) -> ()) {

        scan(filesToDecls) { (path, decls, lock) in
            do {
                let node = try SyntaxParser.parse(path)
                let rewriter = AccessLevelRewriter(path, module: filesToModules[path], decls: decls)
                let ret = rewriter.visit(node)
                lock?.lock()
                completion(path, ret.description)
                lock?.unlock()
            }  catch {
                fatalError(error.localizedDescription)
            }
        }
    }