Exemple #1
0
        public override Node Clone()
        {
            var ret = new KeyedElementList();

            for (int i = 0; i < NumChildren(); i++)
            {
                ret.AddChild(GetChild(i)?.Clone());
            }
            return(ret);
        }
Exemple #2
0
        public override Expression CloneExpr()
        {
            var newList = new KeyedElementList();
            foreach(var ke in Elements.FilteredChildren<KeyedElement>())
            {
                newList.AddChild(
                    new KeyedElement(
                        ke.Key == null ? null : ke.Key.CloneExpr(),
                        ke.Element.CloneExpr()));
            }

            return new CompositeLiteral(
                Type.CloneType(),
                newList);
        }
Exemple #3
0
 public CompositeLiteral(Type t, KeyedElementList els)
     : base(true, 2)
 {
     Type = t;
     Elements = els;
 }