Exemplo n.º 1
0
 public override Variable Clone()
 {
     Identifier clone=new Identifier(_name);
     foreach (Variable v in _children)
     clone.Add(v.Clone());
     return clone;
 }
Exemplo n.º 2
0
 void __add(CollectionVariable collection, List<_IndexVariablePair> pairs, string name, ref int addcount)
 {
     if (pairs.Count>0) {
     bool first=true;
     Identifier iden=new Identifier(name, collection);
     foreach (_IndexVariablePair pair in pairs) {
         collection.Children.RemoveAt(pair.i);
         if (first) {
             collection.Children.Insert(pair.i, iden);
             first=false;
         }
         iden.Add(pair.variable); // re-own to the new identifier
     }
     addcount++;
     }
 }