File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public struct Lexer {
22
22
/// A lexeme is the fundamental output unit of lexical analysis. Each lexeme
23
23
/// represents a fully identified, meaningful part of the input text that
24
24
/// will can be consumed by a ``Parser``.
25
- public struct Lexeme {
25
+ public struct Lexeme : CustomDebugStringConvertible {
26
26
@_spi ( RawSyntax)
27
27
public var tokenKind : RawTokenKind
28
28
public var isAtStartOfLine : Bool
@@ -77,6 +77,10 @@ public struct Lexer {
77
77
SyntaxText ( baseAddress: start. advanced ( by: leadingTriviaByteLength+ textByteLength) ,
78
78
count: trailingTriviaByteLength)
79
79
}
80
+
81
+ public var debugDescription : String {
82
+ return String ( syntaxText: SyntaxText ( baseAddress: start, count: byteLength) )
83
+ }
80
84
}
81
85
}
82
86
You can’t perform that action at this time.
0 commit comments