clean context to analyze next file
so REPL can be reused after error this patch adds one more ugly hack to REPL
This commit is contained in:
@@ -190,6 +190,7 @@ public class ReplInterpreter {
|
||||
}
|
||||
|
||||
injector.getTopDownAnalyzer().prepareForTheNextReplLine();
|
||||
trace.clearDiagnostics();
|
||||
|
||||
psiFile.getScript().putUserData(ScriptHeaderResolver.PRIORITY_KEY, lineNumber);
|
||||
|
||||
|
||||
@@ -59,6 +59,10 @@ public class BindingTraceContext implements BindingTrace {
|
||||
diagnostics.add(diagnostic);
|
||||
}
|
||||
|
||||
public void clearDiagnostics() {
|
||||
diagnostics.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BindingContext getBindingContext() {
|
||||
return bindingContext;
|
||||
|
||||
@@ -134,8 +134,7 @@ public class ReplInterpreterTest {
|
||||
|
||||
@Test
|
||||
public void analyzeErrors() {
|
||||
// TODO
|
||||
//testFile("analyzeErrors.repl");
|
||||
testFile("analyzeErrors.repl");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user