Skip to content

Commit

Permalink
Add colorization to REPL and its parse trees
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlin7 committed Sep 24, 2021
1 parent 63d6b02 commit e1b1de4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Kookie/CodeAnalysis/Syntax/SyntaxNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ private static void PrettyPrint(TextWriter writer, SyntaxNode node, string inden
writer.Write(marker);

if (isToConsole)
{
Console.ForegroundColor = node is SyntaxToken ? ConsoleColor.Blue : ConsoleColor.Cyan;
writer.Write(node.Kind);
Console.ResetColor();
}

writer.Write(node.Kind);

if (node is SyntaxToken {Value: { }} token)
{
Expand Down

0 comments on commit e1b1de4

Please sign in to comment.