Пример #1
0
 public override int VisitBool([NotNull] CoolParser.BoolContext context)
 {
     if (context.GetText() == "true")
     {
         return(1);
     }
     return(0);
 }
Пример #2
0
 public override AST_Node VisitBool([NotNull] CoolParser.BoolContext context)
 {
     return(new AST_Cte(context, new AST_Token(context.GetText(), (context.cte.Type == CoolLexer.TRUE)?"true":"false")));
 }