private Expr Or() { Expr expr = And(); while (Match(TokenType.OR)) { Token op = Previous(); Expr right = And(); expr = new Expressions.Logical(expr, op, right); } return(expr); }
private Expr And() { Expr expr = Equality(); while (Match(TokenType.AND)) { Token op = Previous(); Expr right = Equality(); expr = new Expressions.Logical(expr, op, right); } return(expr); }
object Expressions.IVisitor <object> .VisitLogicalExpr(Expressions.Logical expr) { Resolve(expr.Left); Resolve(expr.Right); return(null); }