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
public struct Flags : OptionSet {
27
27
public var rawValue : UInt8
28
28
@@ -97,6 +97,10 @@ public struct Lexer {
97
97
SyntaxText ( baseAddress: start. advanced ( by: leadingTriviaByteLength+ textByteLength) ,
98
98
count: trailingTriviaByteLength)
99
99
}
100
+
101
+ public var debugDescription : String {
102
+ return String ( syntaxText: SyntaxText ( baseAddress: start, count: byteLength) )
103
+ }
100
104
}
101
105
}
102
106
You can’t perform that action at this time.
0 commit comments