Example #1
0
        public void Calculate(CalculatorContext memory)
        {
            //memory.PopNumber();
            if (memory.Count() < 2)
            {
                throw new SyntaxErrorException();
            }
            var exp1 = memory.PopNumber();
            var exp2 = memory.PopNumber();

            memory.PushNumber(new Number(exp2.Value * exp1.Value));
        }