We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80c0331 commit cfbec20Copy full SHA for cfbec20
Sources/SwiftSyntax/RawSyntax.swift
@@ -24,10 +24,17 @@ internal struct RawSyntaxData {
24
/// Token with lazy trivia parsing.
25
///
26
/// The RawSyntax's `arena` must have a valid trivia parsing function to
27
- /// lazily materialize the leading/trailing trivia.
+ /// lazily materialize the leading/trailing trivia pieces.
28
struct ParsedToken {
29
var tokenKind: RawTokenKind
30
+
31
+ /// Whole of this token including leading/trailing trivia.
32
var wholeText: SyntaxText
33
34
+ /// Range of the actual token’s text.
35
+ ///
36
+ /// Text in `wholeText` before `textRange.lowerBound` is leading trivia and
37
+ /// after `textRange.upperBound` is trailing trivia.
38
var textRange: Range<SyntaxText.Index>
39
}
40
0 commit comments