private Statement ParseThrow() { ThrowStatement result = new ThrowStatement(); result.Exception = this.PopOperandStack(); return result; }
/// <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); }
/// <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; }
/// <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); }
/// <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); }
/// <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; }