public override void ExitNumeralValue([NotNull] FormulaParser.NumeralValueContext context) { var text = context.GetText(); if (text[text.Length - 1] == '%') { text = text.Substring(0, text.Length - 1) + "/100.0"; } resultBuilder.Append(text); TryPopOp(); }
/// <summary> /// Exit a parse tree produced by the <c>NumeralValue</c> /// labeled alternative in <see cref="FormulaParser.expression"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitNumeralValue([NotNull] FormulaParser.NumeralValueContext context) { }