Esempio n. 1
0
 public BoolNode(CoolParser.BoolExpContext context, Node s) : base(s.Childs)
 {
     this.context = context;
     this.V       = context.BOOL().GetText().ToLower() == "true";
     Type         = "Bool";
 }
Esempio n. 2
0
        public override Node VisitBoolExp([NotNull] CoolParser.BoolExpContext context)
        {
            var s = VisitChildren(context);

            return(new BoolNode(context, s));
        }
Esempio n. 3
0
 public override object VisitBoolExp([NotNull] CoolParser.BoolExpContext context)
 {
     VisitExpr(context);
     dotcode += "\"" + context.GetType().Name.Substring(0, context.GetType().Name.Length - 7) + "\"[label=" + context.GetText() + "]" + "\n";
     return(VisitChildren(context));
 }
 public override object VisitBoolExp([NotNull] CoolParser.BoolExpContext context)
 {
     return(new Constant(context.GetText().ToLower() == "true", p.Types["Bool"], GetCoord(context)));
 }
Esempio n. 5
0
 /// <summary>
 /// Exit a parse tree produced by the <c>boolExp</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 ExitBoolExp([NotNull] CoolParser.BoolExpContext context)
 {
 }
 /// <summary>
 /// Visit a parse tree produced by the <c>boolExp</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 VisitBoolExp([NotNull] CoolParser.BoolExpContext context)
 {
     return(VisitChildren(context));
 }
Esempio n. 7
0
 public override bool VisitBoolExp([NotNull] CoolParser.BoolExpContext context)
 {
     return(VisitChildren(context));
 }