public override double VisitPrimaryExpression([NotNull] HelloParser.PrimaryExpressionContext context) { double res = 0; if (context.literal() != null) { res = VisitLiteral(context.literal()); } else if (context.propertyCall() != null) { res = VisitPropertyCall(context.propertyCall()); } else if (context.ifExpression() != null) { res = VisitIfExpression(context.ifExpression()); } return(res); }
/// <summary> /// Exit a parse tree produced by <see cref="HelloParser.primaryExpression"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitPrimaryExpression([NotNull] HelloParser.PrimaryExpressionContext context) { }
/// <summary> /// Visit a parse tree produced by <see cref="HelloParser.primaryExpression"/>. /// <para> /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/> /// on <paramref name="context"/>. /// </para> /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public virtual Result VisitPrimaryExpression([NotNull] HelloParser.PrimaryExpressionContext context) { return(VisitChildren(context)); }