TokenKind
Enumerates the kinds of tokens in the Swift language.
enum TokenKindEnumerates the kinds of tokens in the Swift language.
enum TokenKindimport SwiftSyntaxA library for working with Swift code.
case arrowcase atSigncase backslashcase backtickcase binaryOperator(String)case coloncase commacase dollarIdentifier(String)case ellipsiscase endOfFilecase equalcase exclamationMarkcase floatLiteral(String)case identifier(String)case infixQuestionMarkcase integerLiteral(String)case keyword(Keyword)case leftAnglecase leftBracecase leftParencase leftSquarecase multilineStringQuotecase periodcase postfixOperator(String)case postfixQuestionMarkcase poundcase poundAvailablecase poundElsecase poundElseifcase poundEndifcase poundIfcase poundSourceLocationcase poundUnavailablecase prefixAmpersandcase prefixOperator(String)case rawStringPoundDelimiter(String)case regexLiteralPattern(String)case regexPoundDelimiter(String)case regexSlashcase rightAnglecase rightBracecase rightParencase rightSquarecase semicoloncase shebang(String)case singleQuotecase stringQuotecase stringSegment(String)case unknown(String)case wildcardstruct TokenSyntaxA Syntax node representing a single token.
struct TokenSequenceSequence of tokens that are part of the provided Syntax node.
enum SourcePresenceAn indicator of whether a Syntax node was found or written in the source.
protocol CopyableA type whose values can be implicitly or explicitly copied.
protocol EquatableA type that can be compared for value equality.
protocol Escapableprotocol 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 fromRaw(kind rawKind: RawTokenKind, text: String) -> TokenKind If the rawKind has a defaultText, text can be empty.
var defaultText: SyntaxText? { get }If this token kind always has the same syntax text, that syntax text, otherwise nil.
var isPunctuation: Bool { get }Returns true if the token is a Swift punctuator.
var text: String { get }The textual representation of this token kind.
static func == (lhs: TokenKind, rhs: TokenKind) -> Bool func decomposeToRaw() -> (rawKind: RawTokenKind, string: String?) Returns the RawTokenKind of this TokenKind and, if this TokenKind has associated text, the associated text, otherwise nil.
static var eof: TokenKind { get }static var leftSquareBracket: TokenKind { get }static var poundAvailableKeyword: TokenKind { get }static var poundElseKeyword: TokenKind { get }static var poundElseifKeyword: TokenKind { get }static var poundEndifKeyword: TokenKind { get }static var poundIfKeyword: TokenKind { get }static var poundSourceLocationKeyword: TokenKind { get }static var poundUnavailableKeyword: TokenKind { get }static var rightSquareBracket: TokenKind { get }static func extendedRegexDelimiter(_ text: String) -> TokenKind static func floatingLiteral(_ text: String) -> TokenKind static func rawStringDelimiter(_ text: String) -> TokenKind static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.
import SwiftParserA parser for the Swift programming language.
var isLexerClassifiedKeyword: Bool { get }Returns true if the token is a Swift keyword.