diff options
Diffstat (limited to 'compiler/lexer.nim')
-rwxr-xr-x | compiler/lexer.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/lexer.nim b/compiler/lexer.nim index 15f874bbd..b2932033d 100755 --- a/compiler/lexer.nim +++ b/compiler/lexer.nim @@ -165,6 +165,10 @@ proc tokToStr*(tok: TToken): string = InternalError("tokToStr") result = "" +proc prettyTok*(tok: TToken): string = + if IsKeyword(tok.tokType): result = "keyword " & tok.ident.s + else: result = tokToStr(tok) + proc PrintTok*(tok: TToken) = write(stdout, TokTypeToStr[tok.tokType]) write(stdout, " ") |