public LessEqualNode(CoolParser.LessEqualExpContext context, Node s) : base(s.Childs)
 {
     this.context = context;
     this.s       = s;
     this.lhs     = Childs[0];
     this.rhs     = Childs[1];
 }
Exemplo n.º 2
0
        public override object VisitLessEqualExp([NotNull] CoolParser.LessEqualExpContext context)
        {
            VisitExpr(context);
            dotcode += "\"" + context.GetType().Name.Substring(0, context.GetType().Name.Length - 7) + "\"[label=" + "\"<=\"" + "]" + "\n";

            return(VisitChildren(context));
        }
        public override object VisitLessEqualExp([NotNull] CoolParser.LessEqualExpContext context)
        {
            Expression left  = (Expression)Visit(context.expresion()[0]);
            Expression right = (Expression)Visit(context.expresion()[1]);

            return(new BinCompExp(left, right, BoolOp.lesserEq, GetCoord(context)));
        }
Exemplo n.º 4
0
        public override Node VisitLessEqualExp([NotNull] CoolParser.LessEqualExpContext context)
        {
            var s = VisitChildren(context);

            return(new LessEqualNode(context, s));
        }
Exemplo n.º 5
0
 /// <summary>
 /// Exit a parse tree produced by the <c>lessEqualExp</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 ExitLessEqualExp([NotNull] CoolParser.LessEqualExpContext context)
 {
 }
 /// <summary>
 /// Visit a parse tree produced by the <c>lessEqualExp</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 VisitLessEqualExp([NotNull] CoolParser.LessEqualExpContext context)
 {
     return(VisitChildren(context));
 }
Exemplo n.º 7
0
 public static string getCoolType(this CoolParser.LessEqualExpContext s)
 {
     return("BOOL");
 }
Exemplo n.º 8
0
 public override bool VisitLessEqualExp([NotNull] CoolParser.LessEqualExpContext context)
 {
     return(VisitChildren(context));
 }