Beispiel #1
0
 /// <summary>
 /// Visita el nodo correspondiente a un entero
 /// </summary>
 /// <param name="context">Variable de contexto</param>
 /// <returns>Devuelve el valor del entero</returns>
 public override double VisitInt(CalculatorParser.IntContext context)
 {
     return(double.Parse(context.INT().GetText()));
 }
Beispiel #2
0
 /// <summary>
 /// Exit a parse tree produced by the <c>int</c>
 /// labeled alternative in <see cref="CalculatorParser.expr"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitInt([NotNull] CalculatorParser.IntContext context)
 {
 }