boolean (PsiExpression expression) { if (expression instanceof PsiPolyadicExpression polyadicExpression) { return s_booleanOperators.contains(polyadicExpression.getOperationTokenType()); } else if (expression instanceof PsiPrefixExpression prefixExpression) { return JavaTokenType.EXCL.equals(prefixExpression.getOperationTokenType()); } else if (expression instanceof PsiParenthesizedExpression parenthesizedExpression) { return isBoolean(parenthesizedExpression.getExpression()); } return false; }