Avatar
omochimetaru 9/5/2017 4:10 AM
/// Lazily and singly computed Void constants to initialize SourceKit once per session. private let initializeSourceKit: Void = { sourcekitd_initialize() }() private let initializeSourceKitFailable: Void = { initializeSourceKit sourcekitd_set_notification_handler { response in if !sourcekitd_response_is_error(response!) { fflush(stdout) fputs("sourcekitten: connection to SourceKitService restored!\n", stderr) sourceKitWaitingRestoredSemaphore.signal() } sourcekitd_response_dispose(response!) } }()
⬆ 1
4:10 AM
グローバル変数のletをVoid型に宣言してlazy関数にしてる・・・