Beispiel #1
0
 private static VifObject DoBuild(IEnumerable<string> lines)
 {
     var current = new VifObject {IsRoot = true};
     foreach (var line in lines)
     {
         if (ObjectInlineRegex.IsMatch(line))
         {
             var vif = new VifObject();
             vif.AddBeginObjectLine(line);
             vif.Parent = current;
             current = vif;
             continue;
         }
         if (EndOfObjectRegex.IsMatch(line))
         {
             current.AddEndOfObjectLine(line);
             current = current.Parent;
             continue;
         }
         current.AddLine(line);
     }
     return current;
 }