Inheritance: PolyadicOperatorExpression
 public virtual void Visit(LogicalAndExpression node)
 {
     Visit((PolyadicOperatorExpression)node);
 }
Esempio n. 2
0
        /// <summary>
        ///     <code>higherPRJExpr ( ('AND'|'&&') higherPRJExpr )*</code>
        /// </summary>
        /// <exception cref="System.SqlSyntaxErrorException" />
        private IExpression LogicalAndExpression()
        {
            LogicalAndExpression and = null;
            for (var expr = LogicalNotExpression();;)
            {
                switch (lexer.Token())
                {
                    case MySqlToken.OpLogicalAnd:
                    case MySqlToken.KwAnd:
                    {
                        lexer.NextToken();
                        if (and == null)
                        {
                            and = new LogicalAndExpression();
                            and.SetCacheEvalRst(cacheEvalRst);
                            and.AppendOperand(expr);
                            expr = and;
                        }
                        var newExpr = LogicalNotExpression();
                        and.AppendOperand(newExpr);
                        break;
                    }

                    default:
                    {
                        return expr;
                    }
                }
            }
        }