Inheritance: Statement, IThrowStatement
Example #1
0
 private Statement ParseThrow()
 {
     ThrowStatement result = new ThrowStatement();
       result.Exception = this.PopOperandStack();
       return result;
 }
Example #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);
 }
Example #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;
 }
Example #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);
 }
Example #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);
 }
Example #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;
 }