* {@inheritDoc}
*/
@Override
public void visit(BetweenExpression expression) {
Expression betweenExpression = expression.getExpression();
Expression lowerBound = expression.getLowerBoundExpression();
Expression upperBound = expression.getUpperBoundExpression();
// The input parameter is the expression to be tested within the range of values
if (betweenExpression.isAncestor(inputParameter)) {
if (currentExpression == null) {
currentExpression = expression;
lowerBound.accept(this);
currentExpression = null;
}
else {
type = null;
ignoreType = true;
expression = null;
}
// TODO: Not sure how to test this, should get the type for the lower and upper bounds
// and then we compare each other???
}
// The input parameter is on the lower bound side, traverse the upper bound
else if (lowerBound.isAncestor(inputParameter)) {
if (currentExpression == null) {
currentExpression = expression;
upperBound.accept(this);
currentExpression = null;
}
else {
type = null;
ignoreType = true;
expression = null;
}
}
// The input parameter is on the upper bound side, traverse the lower bound
else if (upperBound.isAncestor(inputParameter)) {
if (currentExpression == null) {
currentExpression = expression;
lowerBound.accept(this);
currentExpression = null;
}