public bool Reduce(ExpressionParserHelper parseHelper, Expression you, int priority)
        {
            bool reduced = OperatorPrecedence.IsHigherThan(you.GetType(), priority);

            if (reduced)
            {
                ((T)you).FillInRhs(parseHelper.Pop());
            }
            return(reduced);
        }
Ejemplo n.º 2
0
        public bool Reduce(ExpressionParserHelper parseHelper, Expression you, int priority)
        {
            bool reduced = OperatorPrecedence.IsHigherThan(you.GetType(), priority);

            if (reduced)
            {
                var subResult = ((T)you);
                if (subResult.Second == null)
                {
                    subResult.FillInSecond(parseHelper.Pop());
                }
                else
                {
                    subResult.FillInThird(parseHelper.Pop());
                }
            }
            return(reduced);
        }