Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Sources/SymbolKit/Mixin.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
This source file is part of the Swift.org open source project

Copyright (c) 2021 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 Swift project authors
*/

import Foundation

/**
A protocol that allows extracted symbols to have extra data
aside from the base ``SymbolGraph/Symbol``.
*/
public protocol Mixin: Codable {
/**
The key under which a mixin's data is filed.

> Important: With respect to deserialization, this framework assumes `mixinKey`s between instances of `SymbolMixin` are unique.
*/
static var mixinKey: String { get }
}
Original file line number Diff line number Diff line change
Expand Up @@ -202,37 +202,3 @@ extension SymbolGraph.LineList {
}
}
}

extension SymbolGraph.LineList {
/**
Represents a selection in text: a start and end position, a half-open range.
*/
public struct SourceRange: Equatable, Codable {
/**
The range's start position.
*/
public var start: Position

/**
The range's end position.
*/
public var end: Position
}
}

extension SymbolGraph.LineList.SourceRange {
/**
Represents a cursor position in text.
*/
public struct Position: Equatable, Codable {
/**
The zero-based line number of a document.
*/
public var line: Int

/**
The zero-based *byte offset* into a line.
*/
public var character: Int
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
This source file is part of the Swift.org open source project

Copyright (c) 2021 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 Swift project authors
*/

import Foundation

extension SymbolGraph.LineList.SourceRange {
/**
Represents a cursor position in text.
*/
public struct Position: Equatable, Codable {
/**
The zero-based line number of a document.
*/
public var line: Int

/**
The zero-based *byte offset* into a line.
*/
public var character: Int
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
This source file is part of the Swift.org open source project

Copyright (c) 2021 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 Swift project authors
*/

import Foundation

extension SymbolGraph.LineList {
/**
Represents a selection in text: a start and end position, a half-open range.
*/
public struct SourceRange: Equatable, Codable {
/**
The range's start position.
*/
public var start: Position

/**
The range's end position.
*/
public var end: Position
}
}
269 changes: 0 additions & 269 deletions Sources/SymbolKit/SymbolGraph/Relationship.swift

This file was deleted.

Loading