 }
 
 /**
-Print XML-formatted docs for the specified Xcode project
+Print JSON and XML-formatted docs for the specified Swift file.
 
 :param: arguments compiler arguments to pass to SourceKit
-:param: swiftFiles array of Swift file names to document
-*/
-func docs_for_swift_compiler_args(arguments: [String], swiftFiles: [String]) {
+:param: file Path to Swift file to document
+*/
+func docs_for_swift_compiler_args(arguments: [String], file: String) {
     sourcekitd_initialize()
 
     // Construct SourceKit requests for getting general info about a Swift file and getting cursor info

    // Send SourceKit request
    var response = sendSourceKitRequest(request)
    response.removeValueForKey("key.syntaxmap")
    replaceUIDsWithStringsInDictionary(&response)
    println(toJSON(response))
}


        printHelp()
    } else if let xcodebuildOutput = run_xcodebuild(arguments) {
        if let swiftcArguments = swiftc_arguments_from_xcodebuild_output(xcodebuildOutput) {
            // Spawn new processes for each Swift file because SourceKit crashes otherwise
            let swiftFiles = swiftFilesFromArray(swiftcArguments)
            println("[")
            for (index, file) in enumerate(swiftFiles) {
                printSTDERR("parsing \(file.lastPathComponent) (\(index + 1)/\(swiftFiles.count))")
                var self_arguments = ["--single-file", file]
                self_arguments.extend(swiftcArguments)
                println(run_self(self_arguments))
                if index < swiftFiles.count-1 {
                    println(",")
                }
            }
            println("]")
        } else {
            error(xcodebuildOutput)
        }
