int (final CharSequence seq, Language fileLanguage, final Project project) { Lexer lexer = myLexerFunction.apply(LanguageLevel.HIGHEST); return PsiBuilderUtil.hasProperBraceBalance(seq, lexer, JavaTokenType.LBRACE, JavaTokenType.RBRACE) ? NO_ERRORS : FATAL_ERROR; }