Ejemplo n.º 1
0
            public override Result VisitPostfixExpression([NotNull] OclParser.PostfixExpressionContext context)
            {
                Result last = this.GlobalResult;

                if (context.propertyCall() == null || context.propertyCall().Length == 0)
                {
                    this.GlobalResult = this.VisitPrimaryExpression(context.primaryExpression());
                }
                else
                {
                    this.GlobalResult = this.VisitPrimaryExpression(context.primaryExpression());
                    for (int i = 0; i < context.propertyCall().Length; i++)
                    {
                        this.GlobalResult = this.VisitPropertyCall(context.propertyCall()[i]);
                    }
                }

                Result newResult = this.GlobalResult;

                this.GlobalResult = last;
                return(newResult);
            }
Ejemplo n.º 2
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="OclParser.postfixExpression"/>.
 /// <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 VisitPostfixExpression([NotNull] OclParser.PostfixExpressionContext context)
 {
     return(VisitChildren(context));
 }