protected internal override MAst Transform()
        {
            ConstantExpression constant = MAst.Constant(_value, typeof(string));

            return(Args.Count() == 0
                       ? (MAst)constant
                       : MAst.Invoke(_stringFormatExpression,
                                     constant,
                                     MAst.NewArrayInit(typeof(object), from arg in Args select arg.Transform().Convert <object>())));
        }
Ejemplo n.º 2
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();
            }
        }
 protected internal override MAst Transform()
 {
     return(MAst.Invoke(_pointer,
                        from parameter in Parameters
                        select parameter.Transform()));
 }
 protected internal override MAst Transform()
 {
     return(MAst.Invoke(_pointer.Function, from arg in Args select arg.Transform()));
 }