1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

Add a dumpNodesFlat routine since dumpNodes is confusing me, and crashes

This commit is contained in:
Kevin Glynn 2010-11-24 07:25:31 +01:00
parent 9f2015ed92
commit 86a23b1c78

View File

@ -49,6 +49,18 @@ namespace RusticiSoftware.Translator.AntlrUtils
Console.ResetColor();
}
public static void DumpNodesFlat(CommonTreeNodeStream nodes)
{
Console.ForegroundColor = ConsoleColor.Magenta;
Console.WriteLine("Nodes");
object o = nodes.NextElement();
while (!nodes.IsEndOfFile(o))
{
Console.WriteLine(" {0}", o.ToString());
o = nodes.NextElement();
}
Console.ResetColor();
}
}
}