private bool EvaluateRelationalExpr(DoggolangParser.RelationalExprContext context) { switch (context.op.Type) { case DoggolangParser.LT: return(Visit(context.lhs) < Visit(context.rhs)); case DoggolangParser.GT: return(Visit(context.lhs) > Visit(context.rhs)); default: return(false); } }
public override int VisitRelationalExpr(DoggolangParser.RelationalExprContext context) { return(Convert.ToInt32(EvaluateRelationalExpr(context))); }