コード例 #1
0
        protected internal override MAst Transform()
        {
            MAst left  = Left.Transform();
            MAst right = Right.Transform();

            switch (Operator)
            {
            case TigerOperator.AndAlso:
                return(MAst.AndAlso(left, right));

            case TigerOperator.OrElse:
                return(MAst.OrElse(left, right));

            case TigerOperator.ExclusiveOr:
                return(MAst.ExclusiveOr(left, right));

            case TigerOperator.LessThan:
                return(MAst.LessThan(left, right));

            case TigerOperator.LessThanOrEqual:
                return(MAst.LessThanOrEqual(left, right));

            case TigerOperator.GreaterThan:
                return(MAst.GreaterThan(left, right));

            case TigerOperator.GreaterThanOrEqual:
                return(MAst.GreaterThanOrEqual(left, right));

            case TigerOperator.Equal:
                return(MAst.Invoke(EqualsExpression, left.Convert <object>(), right.Convert <object>()));

            case TigerOperator.NotEqual:
                return(MAst.Invoke(NotEqualsExpression, left.Convert <object>(), right.Convert <object>()));

            default:
                throw new ArgumentOutOfRangeException();
            }
        }