public void Or() { var right = _expressions.Pop(); var left = _expressions.Pop(); if (right.IsNull || left.IsNull) { _expressions.Push(NullIndexExpression.Instance); return; } var and = new AndIndexExpression(left, right); _expressions.Push(and); }
public void And() { if (_expressions.Count <= 1) throw ExpressionTreeParseException.InvalidExpressionCount("And"); var right = _expressions.Pop(); var left = _expressions.Pop(); if (right.IsNull) { _expressions.Push(left); return; } if (left.IsNull) { _expressions.Push(right); return; } var and = new AndIndexExpression(left, right); _expressions.Push(and); }