Inheritance: Statement, IThrowStatement
示例#1
0
 private Statement ParseThrow()
 {
     ThrowStatement result = new ThrowStatement();
       result.Exception = this.PopOperandStack();
       return result;
 }
示例#2
0
 /// <summary>
 /// Visits the specified throw statement.
 /// </summary>
 /// <param name="throwStatement">The throw statement.</param>
 public override void Visit(IThrowStatement throwStatement)
 {
     ThrowStatement mutableThrowStatement = new ThrowStatement(throwStatement);
     this.resultStatement = this.myCodeCopier.DeepCopy(mutableThrowStatement);
 }
示例#3
0
 /// <summary>
 /// Visits the specified throw statement.
 /// </summary>
 /// <param name="throwStatement">The throw statement.</param>
 /// <returns></returns>
 protected virtual IStatement DeepCopy(ThrowStatement throwStatement)
 {
     if (throwStatement.Exception != null)
     throwStatement.Exception = Substitute(throwStatement.Exception);
       return throwStatement;
 }
示例#4
0
 /// <summary>
 /// Rewrites the children of the throw statement.
 /// </summary>
 public virtual void RewriteChildren(ThrowStatement throwStatement)
 {
     this.RewriteChildren((Statement)throwStatement);
       throwStatement.Exception = this.Rewrite(throwStatement.Exception);
 }
示例#5
0
 /// <summary>
 /// Visits the specified throw statement.
 /// </summary>
 /// <param name="throwStatement">The throw statement.</param>
 public override void Visit(IThrowStatement throwStatement)
 {
     ThrowStatement mutableThrowStatement = throwStatement as ThrowStatement;
     if (alwaysMakeACopy || mutableThrowStatement == null) mutableThrowStatement = new ThrowStatement(throwStatement);
     this.resultStatement = this.myCodeMutator.Visit(mutableThrowStatement);
 }
示例#6
0
 /// <summary>
 /// Visits the specified throw statement.
 /// </summary>
 /// <param name="throwStatement">The throw statement.</param>
 /// <returns></returns>
 public virtual IStatement Visit(ThrowStatement throwStatement)
 {
     if (throwStatement.Exception != null)
     throwStatement.Exception = Visit(throwStatement.Exception);
       return throwStatement;
 }