private void RemoveIfMatchedPairFound()
{
if (m_pairTokensFound.Count < 2)
return;
TextTokenSubstring possibleClose = m_pairTokensFound[m_pairTokensFound.Count - 1];
TextTokenSubstring possibleOpen = m_pairTokensFound[m_pairTokensFound.Count - 2];
if (m_pairList.IsMatchedPair(possibleOpen.Text, possibleClose.Text))
{
// Found a matched pair, remove last two tokens
m_pairTokensFound.RemoveAt(m_pairTokensFound.Count - 1);
m_pairTokensFound.RemoveAt(m_pairTokensFound.Count - 1);
}
}