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