if (expr.getLeft() instanceof PrimaryExpression && param instanceof Literal) {
String matchesExpr = getPrefixFromMatchesExpression(((Literal) param).getLiteral());
addPrefix((PrimaryExpression) expr.getLeft(), new Literal(matchesExpr), matchesExpr, qd);
} else if (expr.getLeft() instanceof PrimaryExpression &&
param instanceof ParameterExpression) {
ParameterExpression parameterExpression = (ParameterExpression) param;
Object parameterValue = getParameterValue(qd, parameterExpression);
String matchesExpr = getPrefixFromMatchesExpression(parameterValue);
addPrefix((PrimaryExpression) expr.getLeft(), new Literal(matchesExpr), matchesExpr, qd);
} else {
// We don't know what this is.