public virtual void Downup(object t)
 {
     TreeVisitor visitor = new TreeVisitor(new CommonTreeAdaptor());
     Func<object, object> preAction = delegate (object o) {
         this.ApplyOnce(o, new Action(this.Topdown));
         return o;
     };
     Func<object, object> postAction = delegate (object o) {
         this.ApplyOnce(o, new Action(this.Bottomup));
         return o;
     };
     visitor.Visit(t, preAction, postAction);
 }
예제 #2
0
 public virtual void Downup( object t )
 {
     TreeVisitor v = new TreeVisitor( new CommonTreeAdaptor() );
     Func<object, object> pre = ( o ) =>
     {
         ApplyOnce( o, Topdown );
         return o;
     };
     Func<object, object> post = ( o ) =>
     {
         ApplyOnce( o, Bottomup );
         return o;
     };
     v.Visit( t, pre, post );
 }
예제 #3
0
 public virtual object Downup( object t )
 {
     TreeVisitor v = new TreeVisitor( new CommonTreeAdaptor() );
     t = v.Visit( t, ( o ) => ApplyOnce( o, topdown_func ), ( o ) => ApplyRepeatedly( o, bottomup_func ) );
     return t;
 }
 public virtual object Downup(object t, bool showTransformations)
 {
     this.showTransformations = showTransformations;
     t = new TreeVisitor(new CommonTreeAdaptor()).Visit(t, o => this.ApplyOnce(o, this.topdown_func), o => this.ApplyRepeatedly(o, this.bottomup_func));
     return t;
 }