void (BasicPrattExpressionParser parser, PsiBuilder builder, PsiBuilder.Marker beforeLhs, IElementType binOpType, int currentPrecedence, int mode) { int operandCount = 1; while (true) { advanceBinOpToken(builder, binOpType); PsiBuilder.Marker rhs = parser.tryParseWithPrecedenceAtMost(builder, currentPrecedence - 1, mode); IElementType nextToken = getBinOpToken(builder); if (rhs != null) { operandCount++; } if (rhs == null || nextToken != binOpType) { if (rhs == null) { error(builder, JavaPsiBundle.message("expected.expression")); } break; } } done(beforeLhs, operandCount > 2 ? myJavaElementTypeContainer.POLYADIC_EXPRESSION : myJavaElementTypeContainer.BINARY_EXPRESSION, myWhiteSpaceAndCommentSetHolder); }