Esempio n. 1
0
        public bool VisitExprBooleanAnd(ExprBooleanAnd expr, TCtx arg)
        {
            var res = this.Visit(expr, "BooleanAnd", arg, out var argOut) && this.Accept("Left", expr.Left, argOut) && this.Accept("Right", expr.Right, argOut);

            this._visitor.EndVisitExpr(expr, arg);
            return(res);
        }
Esempio n. 2
0
        //Boolean Expressions

        public bool VisitExprBooleanAnd(ExprBooleanAnd expr, IExpr?parent)
        {
            if (expr.Left is ExprBooleanOr)
            {
                this.AcceptPar('(', expr.Left, ')', expr);
                this.Builder.Append("AND");
            }
            else
            {
                expr.Left.Accept(this, expr);
                this.Builder.Append(" AND");
            }

            if (expr.Right is ExprBooleanOr)
            {
                this.AcceptPar('(', expr.Right, ')', expr);
            }
            else
            {
                this.Builder.Append(' ');
                expr.Right.Accept(this, expr);
            }

            return(true);
        }
Esempio n. 3
0
 public static ExprBooleanAnd WithRight(this ExprBooleanAnd original, ExprBoolean newRight)
 => new ExprBooleanAnd(left: original.Left, right: newRight);