public static CodeTerm Decrement(CodeTerm[] arguments)
        {
            try
            {
                Operand operand;
                GetOperand(arguments, out operand);

                return(CodeValue.Create(operand.Decrement()));
            }
            catch (Exception ex)
            {
                return(new CodeValueException(ex));
            }
        }
        public static CodeTerm Multiply(CodeTerm[] arguments)
        {
            try
            {
                Operand lhs;
                Operand rhs;
                GetOperands(arguments, out lhs, out rhs);

                return(CodeValue.Create(lhs.Multiply(rhs)));
            }
            catch (Exception ex)
            {
                return(new CodeValueException(ex));
            }
        }
        public static CodeTerm BitwiseShiftRight(CodeTerm[] arguments)
        {
            try
            {
                Operand lhs;
                Operand rhs;
                GetOperands(arguments, out lhs, out rhs);

                return(CodeValue.Create(lhs.BitwiseShiftRight(rhs)));
            }
            catch (Exception ex)
            {
                return(new CodeValueException(ex));
            }
        }
Exemplo n.º 4
0
        public override void Emit(Emitter e)
        {
            var kind = (HasWin) ? ExpressionKinds.HasWin
        : (Accums > 0) ? ExpressionKinds.HasFold
        : (Lookup == null) ? ExpressionKinds.Closed : ExpressionKinds.Open;
            var eb = ExpressionBlock.Create(Name, kind, Value.Compile(), DataType, Lookup, Accums);

            //var eb = ExpressionBlock.Create(Name, kind, Value.Compile(), Value.DataType, Lookup, Accums);
            if (AsCode)
            {
                e.OutLoad(CodeValue.Create(eb));
            }
            else
            {
                e.OutSeg(eb);
            }
        }