Skip to content

Commit af5f386

Browse files
authored
Merge pull request #2385 from rintaro/rattokenkind-spi
`TokenSyntax.rawTokenKind` to get raw token kind
2 parents 06b57f3 + d4d7b08 commit af5f386

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/SwiftSyntax/TokenSyntax.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ public struct TokenSyntax: SyntaxProtocol, SyntaxHashable {
115115
}
116116
}
117117

118+
@_spi(RawSyntax)
119+
public var rawTokenKind: RawTokenKind {
120+
return tokenView.rawKind
121+
}
122+
118123
/// The length this node takes up spelled out in the source, excluding its
119124
/// leading or trailing trivia.
120125
public var trimmedLength: SourceLength {

0 commit comments

Comments
 (0)