Example #1
0
        protected static void EmitChildWithConvert(BaseExpressionElement child, Type resultType, YaleIlGenerator ilg, ExpressionContext context)
        {
            child.Emit(ilg, context);
            var converted = ImplicitConverter.EmitImplicitConvert(child.ResultType, resultType, ilg);

            Debug.Assert(converted, "convert failed");
        }
Example #2
0
        /// <summary>
        /// Set the left and right operands, get the operation, and get the result type
        /// </summary>
        /// <param name="leftChild"></param>
        /// <param name="rightChild"></param>
        /// <param name="op"></param>
        private void Configure(BaseExpressionElement leftChild, BaseExpressionElement rightChild, object op)
        {
            LeftChild  = leftChild;
            RightChild = rightChild;
            GetOperation(op);

            ValidateInternal(op);
        }
Example #3
0
 public UnaryElement(BaseExpressionElement child)
 {
     MyChild = child;
 }
Example #4
0
 protected static bool IsChildOfType(BaseExpressionElement child, Type t)
 {
     return(ReferenceEquals(child.ResultType, t));
 }