ParserDefinition (@Nullable Language language, @NotNull IElementType tokenType) { Language adjusted = language == null ? tokenType.getLanguage() : language; ParserDefinition parserDefinition = LanguageParserDefinitions.INSTANCE.forLanguage(adjusted); if (parserDefinition == null) { throw new AssertionError("ParserDefinition absent for language: '" + adjusted.getID() + "' (" + adjusted.getClass().getName() + "), " + "for elementType: '" + tokenType.getDebugName() + "' (" + tokenType.getClass().getName() + ")"); } return parserDefinition; }