SILUBS.ScriptureChecks.QTokenProcessor.MatchContinuers C# (CSharp) Method

MatchContinuers() private method

This function is called each time a marker is encountered that should be followed by one or more continuers. Returns true if the expected continuers are present, false otherwise.
private MatchContinuers ( int qrToksIndex, List continuersNeeded, int currentLevel ) : bool
qrToksIndex int The index of the token being processed
continuersNeeded List A list of the continuers expected
currentLevel int The currect level
return bool
		private bool MatchContinuers(int qrToksIndex, List<string> continuersNeeded, int currentLevel)
		{
			for (int i = 0; i < continuersNeeded.Count; i++)
			{
				if ((qrToksIndex + i + 1 >= m_quotationRelatedTokens.Count) ||
					(continuersNeeded[i] != m_quotationRelatedTokens[qrToksIndex + i + 1].Tts.Text))
				{
					return false;
				}

				QuotationMarkToken qmTok =
					m_quotationRelatedTokens[qrToksIndex + i + 1] as QuotationMarkToken;


				if (qmTok == null || !qmTok.PossibleContinuer)
					return false;

				GenerateTraceMsg(qmTok,
					string.Format(Localize("Level {0} quote continuer"), qmTok.PossibleLevel));
			}

			return true;
		}