示例#1
0
 public void Reduce(Type expression)
 {
     if (OperatorPrecedence.Applicable(expression))
     {
         Reduce(OperatorPrecedence.Of(expression));
     }
 }
示例#2
0
        private bool ShouldReduce(ExpressionParserHelper parseHelper)
        {
            if (parseHelper.PeekOnStack == null)
            {
                return(true);
            }
            var myPriority    = OperatorPrecedence.Of(typeof(T));
            var stackPriority = OperatorPrecedence.Of(parseHelper.PeekOnStack.GetType());

            if (myPriority != stackPriority)
            {
                return(true);
            }
            return(false);
        }