boolean (PsiBuilder builder) { if (!expect(builder, JavaTokenType.LPARENTH)) { error(builder, JavaPsiBundle.message("expected.lparen")); return false; } PsiBuilder.Marker beforeExpr = builder.mark(); PsiBuilder.Marker expr = myParser.getExpressionParser().parse(builder); if (expr == null || builder.getTokenType() == JavaTokenType.SEMICOLON) { beforeExpr.rollbackTo(); error(builder, JavaPsiBundle.message("expected.expression")); if (builder.getTokenType() != JavaTokenType.RPARENTH) { return false; } } else { beforeExpr.drop(); if (builder.getTokenType() != JavaTokenType.RPARENTH) { error(builder, JavaPsiBundle.message("expected.rparen")); return false; } } builder.advanceLexer(); return true; }