private static TokenTreeNode GetMatchingNode(char childChar, TokenTreeNode node)
{
//find a bucket with the same childChar as we need
while (node.NextSibling != null && node.Char != childChar)
{
node = node.NextSibling;
}
if (node.Char != childChar)
{
var child = new TokenTreeNode();
node.NextSibling = child;
return child;
}
return node;
}