/// <summary> /// Traverses the specified statement. /// </summary> /// <param name="statement">The statement.</param> public void Traverse(IStatement statement) { Contract.Requires(statement != null); statement.Dispatch(this.dispatchingVisitor); }
/// <summary> /// Visits the specified statement. /// </summary> /// <param name="statement">The statement.</param> public virtual void Visit(IStatement statement) { if (this.stopTraversal) return; statement.Dispatch(this); }
/// <summary> /// Visits the specified statement. /// </summary> /// <param name="statement">The statement.</param> public Statement Copy(IStatement statement) { statement.Dispatch(this.Dispatcher); return (Statement)this.Dispatcher.result; }
/// <summary> /// A dispatcher method that calls the type-specific Substitute for <paramref name="statement"/> /// </summary> /// <param name="statement"></param> /// <returns></returns> public virtual IStatement Substitute(IStatement statement) { statement.Dispatch(this.createMutableType); return this.createMutableType.resultStatement; }
/// <summary> /// Visits the specified statement. /// </summary> /// <param name="statement">The statement.</param> public Statement Copy(IStatement statement) { Contract.Requires(statement != null); Contract.Ensures(Contract.Result<Statement>() != null); statement.Dispatch(this.Dispatcher); return (Statement)this.Dispatcher.result; }
/// <summary> /// Rewrites the specified statement. /// </summary> /// <param name="statement">The statement.</param> public virtual IStatement Rewrite(IStatement statement) { statement.Dispatch(this.dispatchingVisitor); return (IStatement)this.dispatchingVisitor.result; }