Exemple #1
0
        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();
        }
Exemple #2
0
        /// <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();
        }