예제 #1
0
            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);
            }
예제 #2
0
 /// <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)
 {
 }
예제 #3
0
 /// <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));
 }