예제 #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");
        }
예제 #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);
        }
예제 #3
0
파일: UnaryElement.cs 프로젝트: Verent/Yale
 public UnaryElement(BaseExpressionElement child)
 {
     MyChild = child;
 }
예제 #4
0
 protected static bool IsChildOfType(BaseExpressionElement child, Type t)
 {
     return(ReferenceEquals(child.ResultType, t));
 }