ASTNode (@NotNull ASTNode node, PythonConsoleData consoleData) { final Lexer lexer = createConsoleLexer(node, consoleData); final PsiElement psi = node.getPsi(); if (psi != null) { final Project project = psi.getProject(); final PsiBuilderFactory factory = PsiBuilderFactory.getInstance(); final PsiBuilder builder = factory.createBuilder(project, node, lexer, getLanguage(), node.getChars()); final PyParser parser = new PyConsoleParser(consoleData, getLanguageLevel(psi)); return parser.parse(this, builder).getFirstChildNode(); } return null; }