@Override public boolean matches(final INode other, final Match match) { if (_pattern.matches(other, match)) { return true; } if (other instanceof BinaryOperatorExpression) { final BinaryOperatorExpression binary = (BinaryOperatorExpression) other; if (_operator != BinaryOperatorType.ANY && binary.getOperator() != _operator) { return false; } final int checkPoint = match.getCheckPoint(); if (matches(binary.getLeft(), match) && matches(binary.getRight(), match)) { return true; } match.restoreCheckPoint(checkPoint); } return false; } }
@Override public boolean matches(final INode other, final Match match) { if (_pattern.matches(other, match)) { return true; } if (other instanceof BinaryOperatorExpression) { final BinaryOperatorExpression binary = (BinaryOperatorExpression) other; if (_operator != BinaryOperatorType.ANY && binary.getOperator() != _operator) { return false; } final int checkPoint = match.getCheckPoint(); if (matches(binary.getLeft(), match) && matches(binary.getRight(), match)) { return true; } match.restoreCheckPoint(checkPoint); } return false; } }
@Override public boolean matches(final INode other, final Match match) { if (_pattern.matches(other, match)) { return true; } if (other instanceof BinaryOperatorExpression) { final BinaryOperatorExpression binary = (BinaryOperatorExpression) other; if (_operator != BinaryOperatorType.ANY && binary.getOperator() != _operator) { return false; } final int checkPoint = match.getCheckPoint(); if (matches(binary.getLeft(), match) && matches(binary.getRight(), match)) { return true; } match.restoreCheckPoint(checkPoint); } return false; } }