use of com.jetbrains.python.console.parsing.PythonConsoleLexer in project intellij-community by JetBrains.
the class PyFileElementType method createConsoleLexer.
@Nullable
private Lexer createConsoleLexer(ASTNode node, PythonConsoleData consoleData) {
if (consoleData.isIPythonEnabled()) {
return new PythonConsoleLexer();
} else {
final ParserDefinition parserDefinition = LanguageParserDefinitions.INSTANCE.forLanguage(getLanguage());
if (parserDefinition == null) {
return null;
}
final PsiElement psi = node.getPsi();
if (psi == null) {
return null;
}
final Project project = psi.getProject();
return parserDefinition.createLexer(project);
}
}
Aggregations