예제 #1
0
 public static Element From(E0 e0)
 {
     return(new Element()
     {
         e0 = e0, e1 = null
     });
 }
예제 #2
0
        private void _parser(string pattern)
        {
            _pattern = pattern;

            _childs.Clear();

            var matches = Regex.Matches(pattern, RegexPattern);

            foreach (Match m in matches)
            {
                var e0 = m.Groups["e0"];
                var e1 = m.Groups["e1"];

                if (e0.Success)
                {
                    _childs.Add(Element.From(E0.From(m.Groups["v0"].Value, m.Groups["v1"].Value, m.Groups["v2"].Value, m.Groups["v3"].Value)));
                }

                if (e1.Success)
                {
                    _childs.Add(Element.From(e1.Value));
                }
            }
        }