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); }
/// <summary> /// Exit a parse tree produced by the <c>factorPowopNegate</c> /// labeled alternative in <see cref="calcParser.power"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitFactorPowopNegate([NotNull] calcParser.FactorPowopNegateContext context) { }