IElementType (@NotNull PsiPolyadicExpression expression, @NotNull PsiExpression operand, @Nullable IElementType outerTokenType) { PsiJavaToken operandToken = expression.getTokenBeforeOperand(operand); if (operandToken == null) return outerTokenType; IElementType innerTokenType = operandToken.getTokenType(); if (outerTokenType == null) return innerTokenType; if (!isSamePrecedence(innerTokenType, outerTokenType)) return innerTokenType; if (isInversion(outerTokenType)) return invert(innerTokenType); return innerTokenType; }