private boolean isConcatenation(PsiExpression expression) {
    if (expression == null) {
      return false;
    }
    if (expression instanceof PsiReferenceExpression) {
      final PsiElement referent = ((PsiReference)expression).resolve();
      return variable.equals(referent);
    }
    if (expression instanceof PsiParenthesizedExpression parenthesizedExpression) {
      final PsiExpression body = parenthesizedExpression.getExpression();
      return isConcatenation(body);
    }
    if (expression instanceof PsiPolyadicExpression polyadicExpression) {
      for (PsiExpression operand : polyadicExpression.getOperands()) {
        if (isConcatenation(operand)) return true;
      }
    }
    return false;
  }
private boolean isConcatenation(PsiExpression expression)