internal override MSA.Expression /*!*/ TransformRead(AstGenerator /*!*/ gen) { if (_value != null) { return(Ast.Block( AstUtils.IfThen( _condition.TransformReadBoolean(gen, !_negateCondition), _jumpStatement.Transform(gen) ), _value.TransformRead(gen) )); } else { MSA.Expression tmpVariable = gen.CurrentScope.DefineHiddenVariable("#tmp_cond", typeof(object)); return(Ast.Block( Ast.Assign(tmpVariable, AstUtils.Box(_condition.TransformRead(gen))), AstUtils.IfThen( (_negateCondition ? Methods.IsFalse : Methods.IsTrue).OpCall(tmpVariable), _jumpStatement.Transform(gen) ), tmpVariable )); } }
internal override MSA.Expression /*!*/ TransformRead(AstGenerator /*!*/ gen) { return(Ast.Condition( _condition.TransformReadBoolean(gen, !_negateCondition), AstUtils.Box(_body.TransformRead(gen)), (_elseStatement != null) ? AstUtils.Box(_elseStatement.TransformRead(gen)) : (MSA.Expression)AstUtils.Constant(null) )); }
internal override MSA.Expression /*!*/ TransformRead(AstGenerator /*!*/ gen) { return(AstFactory.Condition( _condition.TransformReadBoolean(gen, true), _trueExpression.TransformRead(gen), _falseExpression.TransformRead(gen) )); }
internal override MSA.Expression /*!*/ TransformReadBoolean(AstGenerator /*!*/ gen, bool positive) { return(AstFactory.Logical(_left.TransformReadBoolean(gen, positive), _right.TransformReadBoolean(gen, positive), positive)); }
internal override MSA.Expression /*!*/ TransformRead(AstGenerator /*!*/ gen) { return(_expression.TransformReadBoolean(gen, false)); }