internal override Node ShallowClone(Node replace, int pos) { var cnode = new UnnDecl(this, true); int occurs = 0; if (Config != null) { cnode.Config = CloneField <Config>(Config, replace, pos, ref occurs); } cnode.Body = CloneField <Node>(Body, replace, pos, ref occurs); return(cnode); }
internal override Node DeepClone(IEnumerable <Node> clonedChildren, bool keepCompilerData) { var cnode = new UnnDecl(this, keepCompilerData); cnode.cachedHashCode = this.cachedHashCode; using (var cenum = clonedChildren.GetEnumerator()) { if (Config != null) { cnode.Config = TakeClone <Config>(cenum); } cnode.Body = TakeClone <Node>(cenum); } return(cnode); }
private UnnDecl(UnnDecl n, bool keepCompilerData) : base(n.Span) { Name = n.Name; CompilerData = keepCompilerData ? n.CompilerData : null; }