예제 #1
0
        internal override Node ShallowClone(Node replace, int pos)
        {
            var cnode  = new CardPair(this, true);
            int occurs = 0;

            cnode.TypeId = CloneField <Id>(TypeId, replace, pos, ref occurs);
            return(cnode);
        }
예제 #2
0
        internal override Node DeepClone(IEnumerable <Node> clonedChildren, bool keepCompilerData)
        {
            var cnode = new CardPair(this, keepCompilerData);

            cnode.cachedHashCode = this.cachedHashCode;
            using (var cenum = clonedChildren.GetEnumerator())
            {
                cnode.TypeId = TakeClone <Id>(cenum);
            }

            return(cnode);
        }
예제 #3
0
 private CardPair(CardPair n, bool keepCompilerData)
     : base(n.Span)
 {
     CompilerData = keepCompilerData ? n.CompilerData : null;
     Cardinality  = n.Cardinality;
 }