mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed PY-14814 IPython Notebook: commitDocument left PSI inconsistent: Throwable at com.intellij.psi.impl.DebugUtil.currentStackTrace
This commit is contained in:
@@ -22,7 +22,19 @@ public class IpnbPyParser extends PyParser {
|
||||
@NotNull
|
||||
@Override
|
||||
public ASTNode parse(IElementType root, PsiBuilder builder) {
|
||||
final PsiBuilder.Marker rootMarker = builder.mark();
|
||||
|
||||
myIPythonStartSymbol = PyConsoleParser.startsWithIPythonSpecialSymbol(builder);
|
||||
return super.parse(root, builder);
|
||||
|
||||
ParsingContext context = createParsingContext(builder, LanguageLevel.getDefault(), null);
|
||||
|
||||
StatementParsing statementParser = context.getStatementParser();
|
||||
builder.setTokenTypeRemapper(statementParser);
|
||||
|
||||
while (!builder.eof()) {
|
||||
statementParser.parseStatement(context.emptyParsingScope());
|
||||
}
|
||||
rootMarker.done(root);
|
||||
return builder.getTreeBuilt();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user