Severity
TokenDiagnostic.swift:17enum Severityenum Severityimport SwiftSyntaxA library for working with Swift code.
struct TokenDiagnosticIf the token has an error that’s inherent to the token itself and not its surrounding structure, this defines the type of the error. byteOffset specifies at which offset the error occurred.
case warningcase errorinit(_ kind: TokenDiagnostic.Kind, byteOffset: Int) Construct a diagnostic of the given kind that is anchored at byteOffset, measured in UTF-8 bytes relative to the leading trivia start of the token this diagnostic will be attached to.
init(_ kind: TokenDiagnostic.Kind, byteOffset: UInt16) Construct a diagnostic of the given kind that is anchored at byteOffset, measured in UTF-8 bytes relative to the leading trivia start of the token this diagnostic will be attached to.
init?(combining lhs: TokenDiagnostic?, _ rhs: TokenDiagnostic?) Picks the more severe error of lhs and rhs, preferring lhs if they have the same severity.
let byteOffset: UInt16The offset at which the error is, in bytes relative to the token’s leading trivia start (i.e. relative to the token’s position)
let kind: TokenDiagnostic.KindThe unique kind of this diagnostic.
var severity: TokenDiagnostic.Severity { get }The severity of the diagnostic, i.e. whether it’s a warning or error.
enum KindEach diagnostic kind is uniquely represented by a value in this enum.
protocol Comparable : EquatableA type that can be compared using the relational operators <, <=, >=, and >.
protocol EquatableA type that can be compared for value equality.
protocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol SendableA thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.
static func ... (minimum: Self) -> PartialRangeFrom<Self> Returns a partial range extending upward from a lower bound.
static func ... (maximum: Self) -> PartialRangeThrough<Self> Returns a partial range up to, and including, its upper bound.
static func ... (minimum: Self, maximum: Self) -> ClosedRange<Self> Returns a closed range that contains both of its bounds.
static func ..< (maximum: Self) -> PartialRangeUpTo<Self> Returns a partial range up to, but not including, its upper bound.
static func ..< (minimum: Self, maximum: Self) -> Range<Self> Returns a half-open range that contains its lower bound but not its upper bound.
static func <= (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument.
static func > (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.
static func >= (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument.