Exemple #1
0
        public override void Visit(ConditionalOp op, Node n)
        {
            VisitScalarOpDefault(op, n);
            switch (op.OpType)
            {
            case OpType.And:
            case OpType.Or:
                AssertArity(n, 2);
                AssertBooleanOp(n.Child0.Op);
                AssertBooleanOp(n.Child1.Op);
                break;

            case OpType.In:
                AssertMinimumArity(n, 2);
                break;

            case OpType.Not:
                AssertArity(n, 1);
                AssertBooleanOp(n.Child0.Op);
                break;

            case OpType.IsNull:
                AssertArity(n, 1);
                break;

            default:
                AssertUnexpectedOp(op);
                break;
            }
            AssertBooleanOp(op);
        }
Exemple #2
0
 // <summary>
 // Copies a ConditionalOp
 // </summary>
 // <param name="op"> The Op to Copy </param>
 // <param name="n"> The Node that references the Op </param>
 // <returns> A copy of the original Node that references a copy of the original Op </returns>
 public override Node Visit(ConditionalOp op, Node n)
 {
     return(CopyDefault(m_destCmd.CreateConditionalOp(op.OpType), n));
 }
 public virtual void Visit(ConditionalOp op, Node n)
 {
     this.VisitScalarOpDefault((ScalarOp)op, n);
 }
Exemple #4
0
 /// <summary>
 ///     Visitor pattern method for ConditionalOp
 /// </summary>
 /// <param name="op"> The ConditionalOp being visited </param>
 /// <param name="n"> The Node that references the Op </param>
 public virtual void Visit(ConditionalOp op, Node n)
 {
     VisitScalarOpDefault(op, n);
 }
Exemple #5
0
 // <summary>
 // ConditionalOp
 // </summary>
 public virtual TResultType Visit(ConditionalOp op, Node n)
 {
     return(VisitScalarOpDefault(op, n));
 }