Пример #1
0
        public override void Visit(IUnaryOpToken t)
        {
            ExpNode operand = m_nodes.Peek();
            char    op      = char.Parse(t.ToString());

            ExpNode unaryOperator = Tables.UnaryOperatorsExpTable[op](operand);

            if (unaryOperator != null)
            {
                m_nodes.Pop();
                m_nodes.Push(unaryOperator);
            }
        }
Пример #2
0
            public override void Visit(IUnaryOpToken t)
            {
                char op = char.Parse(t.ToString());

                SetPriority(Tables.UnaryOperatorsPriorityTable[op]);
            }