public override Node Clone() { var ret = new KeyedElementList(); for (int i = 0; i < NumChildren(); i++) { ret.AddChild(GetChild(i)?.Clone()); } return(ret); }
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); }
public CompositeLiteral(Type t, KeyedElementList els) : base(true, 2) { Type = t; Elements = els; }