mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Apart from removing unnecessary imports, the following changes were
performed:
- Move CancellationToken from SKSupport to LanguageServerProtocol
- Move CustomCodable to its own module
- CustomCodable belongs in LanguageServerProtocol but moving it there
causes compilation to fail. As a workaround, move it to its own
module
33 lines
1.1 KiB
Swift
33 lines
1.1 KiB
Swift
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
/// Represents a reference to a command identified by a string. Used as the result of
|
|
/// requests that returns actions to the user, later used as the parameter of
|
|
/// workspace/executeCommand if the user wishes to execute said command.
|
|
public struct Command: Codable, Hashable {
|
|
|
|
/// The title of this command.
|
|
public var title: String
|
|
|
|
/// The internal identifier of this command.
|
|
public var command: String
|
|
|
|
/// The arguments related to this command.
|
|
public var arguments: [LSPAny]?
|
|
|
|
public init(title: String, command: String, arguments: [LSPAny]?) {
|
|
self.title = title
|
|
self.command = command
|
|
self.arguments = arguments
|
|
}
|
|
}
|