Classes

The following classes are available globally.

  • Thread-safe value wrapper, using dispatch queues to achieve synchronization.

    Note

    This class is not KVO-compliant. If you need this, please use subclasses of DispatchedValue.

    See also

    DispatchedValueWrapper

    See more

    Declaration

    Swift

    public class DispatchedValue<T> : DispatchedValueWrapper
  • Represents a structure of symbols (a class has its methods as sub-entities, etc.).

    This includes the function parameters and their types as entities. Each entity refers to the range of the original text via offset + length entries.

    See more

    Declaration

    Swift

    open class SKBaseEntity : NSObject, SKSequence
  • Represents an annotation for the token of source text.

    It refers to the text via offset + length entries. This includes syntactic annotations (e.g. keywords) and semantic ones. The semantic ones include the name and Unified Symbol Resolution (USR) of the referenced symbol.

    See more

    Declaration

    Swift

    open class SKAnnotation : SKGenericKindEntity<SKAnnotation.Kind>
  • Undocumented

    See more

    Declaration

    Swift

    open class SKByteRange : Codable, Equatable
  • Represents the structure of a symbol.

    Depending on the request, the structure may contain syntactic and semantic information.

    Subclassing

    Fancy your own subclass? No problem.

    final class BetterSubstructureSubclass: SKBaseSubstructure, SKFinalSubclass {
    
        var iAmAnImportantProperty: String = "🚶‍♂️"
    
        public override func decodeChildren(from container: DecodingContainer) throws -> [SKBaseSubstructure]? {
            return try decodeChildren(BetterSubstructureSubclass.self, from: container)
        }
    
        /// The default iterator for `SKChildren` does a pre-order (NLR) depth-first search (DFS) traversal; however, if you want something else, for instance:
        class FunctionSubstructureIterator<Substructure: BetterSubstructureSubclass>: SKPreOrderDFSIterator<Substructure> {
    
            override func next() -> Substructure? {
                guard let nextSubstructure = super.next()
                    else { return nil }
    
                if nextSubstructure.isFunction {
                    return nextSubstructure
                } else {
                    return next()
                }
            }
    
        }
    
        override class func iteratorClass<Substructure: BetterSubstructureSubclass>() -> SKPreOrderDFSIterator<Substructure>.Type {
            return FunctionSubstructureIterator.self
        }
    
    }
    
    See more

    Declaration

    Swift

    open class SKBaseSubstructure : NSObject, SKSequence
  • Represents a SourceKit code completion request that provides code completion suggestions.

    See more

    Declaration

    Swift

    open class SKCodeCompletion : Codable
  • Represents a SourceKit code completion session, which can be filtered using update requests.

    See more

    Declaration

    Swift

    open class SKCodeCompletionSession : NSObject
  • Represents a SourceKit cursor info request.

    See more

    Declaration

    Swift

    open class SKCursorInfo : Codable
  • Represents a Swift file’s syntax information.

    See more

    Declaration

    Swift

    open class SKSyntaxMap : Codable
  • Represents a SourceKit YAML request.

    See more

    Declaration

    Swift

    open class SKYAMLRequest<Response> where Response : Decodable