Пример #1
0
 /// <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);
 }
Пример #2
0
 /// <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);
 }
Пример #3
0
 /// <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;
 }
Пример #4
0
 /// <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;
 }
Пример #5
0
    /// <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;
    }
Пример #6
0
 /// <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;
 }