protected override void Parse(List <string> tokens) { NodeList = NodeList ?? new List <object>(); NodeList.Clear(); string token; while ((token = tokens.Shift()) != null) { Match fullTokenMatch = FullToken.Match(token); if (fullTokenMatch.Success && BlockDelimiter == fullTokenMatch.Groups[1].Value) { EndTag(); return; } else { NodeList.Add(token); } } AssertMissingDelimitation(); }
/// <summary> /// /// </summary> /// <param name="tokens"></param> protected override void Parse(IEnumerable <string> tokens) { NodeList.Clear(); string token; var t = tokens as List <string>; while ((token = t.Shift()) != null) { var fullTokenMatch = FullToken.Match(token); if (fullTokenMatch.Success && BlockDelimiter == fullTokenMatch.Groups[1].Value) { EndTag(); return; } else { NodeList.Add(token); } } AssertMissingDelimitation(); }