Example #1
0
        public override void ExitFactorPowopNegate(calcParser.FactorPowopNegateContext context)
        {
            base.ExitFactorPowopNegate(context);
            var    factor = context.factor();
            var    negate = context.negate();
            double v1     = Annotations.ptp.Get(factor);
            double v2     = Annotations.ptp.Get(negate);
            double res    = Math.Pow(v1, v2);

            Annotations.ptp.Put(context, res);
        }