internal override CodeBase Fiber(Fiber visitedObject)
 {
     var data = visitedObject.FiberItems;
     var newItems = new FiberItem[data.Length];
     var index = data.Length - 1;
     newItems[index] = data[index].Visit(this);
     return Fiber(visitedObject, null, newItems);
 }
Exemplo n.º 2
0
        internal override CodeBase Add(FiberItem subsequentElement)
        {
            var newResult = TryToCombine(subsequentElement);
            if(newResult == null)
                return new Fiber(this, subsequentElement);

            return newResult;
        }
Exemplo n.º 3
0
 void IVisitor.Fiber(FiberHead fiberHead, FiberItem[] fiberItems) => NotImplementedMethod(fiberHead, fiberItems);
Exemplo n.º 4
0
 void IVisitor.Fiber(FiberHead fiberHead, FiberItem[] fiberItems)
 {
     fiberHead.Visit(this);
     foreach(var fiberItem in fiberItems)
         fiberItem.Visit(this);
 }
Exemplo n.º 5
0
 protected virtual CodeBase TryToCombine(FiberItem subsequentElement) => null;
Exemplo n.º 6
0
 void IVisitor.Fiber(FiberHead fiberHead, FiberItem[] fiberItems)
 {
     SubVisit(fiberHead);
     foreach(var codeBase in fiberItems)
         SubVisit(codeBase);
 }
Exemplo n.º 7
0
 internal override CodeBase Add(FiberItem subsequentElement)
 {
     NotImplementedMethod(subsequentElement);
     return null;
 }