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 ); }
public virtual object Downup( object t, bool showTransformations ) { this.showTransformations = showTransformations; TreeVisitor v = new TreeVisitor( new CommonTreeAdaptor() ); t = v.Visit( t, ( o ) => ApplyOnce( o, topdown_func ), ( o ) => ApplyRepeatedly( o, bottomup_func ) ); return t; }