public override object VisitBiggerExp([NotNull] CoolParser.BiggerExpContext context)
        {
            Expression left  = (Expression)Visit(context.expresion()[0]);
            Expression right = (Expression)Visit(context.expresion()[1]);

            return(new BinCompExp(right, left, BoolOp.lesser, GetCoord(context)));
        }
 public BiggerNode(CoolParser.BiggerExpContext context, Node s) : base(s.Childs)
 {
     this.s       = s;
     this.context = context;
     this.lhs     = s.Childs[0];
     this.rhs     = s.Childs[1];
 }
        public override Node VisitBiggerExp([NotNull] CoolParser.BiggerExpContext context)
        {
            var s = VisitChildren(context);

            return(new BiggerNode(context, s));
            //return null;
        }
Exemplo n.º 4
0
 /// <summary>
 /// Exit a parse tree produced by the <c>biggerExp</c>
 /// labeled alternative in <see cref="CoolParser.expresion"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitBiggerExp([NotNull] CoolParser.BiggerExpContext context)
 {
 }
 /// <summary>
 /// Visit a parse tree produced by the <c>methodCallExp</c>
 /// labeled alternative in <see cref="CoolParser.expresion"/>.
 /// <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 VisitBiggerExp([NotNull] CoolParser.BiggerExpContext context)
 {
     return(VisitChildren(context));
 }
 /// <summary>
 /// Enter a parse tree produced by the <c>equalsExp</c>
 /// labeled alternative in <see cref="CoolParser.expresion"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public void EnterBiggerExp([NotNull] CoolParser.BiggerExpContext context)
 {
 }