示例#1
0
        public static Expression UnaryOperatorFunc(
            OpFuncArgs args
            )
        {
            Expression le = args.ExprStack.Pop();

            return(((UnaryOperator)args.Op).Func(le));
        }
示例#2
0
        public static Expression TypeOperatorFunc(
            OpFuncArgs args
            )
        {
            Expression le = args.ExprStack.Pop();

            return(((TypeOperator)args.Op).Func(le, args.T.Type));
        }
示例#3
0
        public static Expression MethodOperatorFunc(
            OpFuncArgs args
            )
        {
            string     nextToken = ((MemberToken)args.T).Name;
            Expression le        = args.ExprStack.Pop();

            Expression result = ((MethodOperator)args.Op).Func(le, nextToken, args.Args);

            return(result);
        }
示例#4
0
        public static Expression BinaryOperatorFunc(
            OpFuncArgs args
            )
        {
            Expression re = args.ExprStack.Pop();
            Expression le = args.ExprStack.Pop();

            // perform implicit conversion on known types
            TypeConversion.Convert(ref le, ref re);
            return(((BinaryOperator)args.Op).Func(le, re));
        }