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:
Stepan Koltsov
2012-06-14 18:30:49 +04:00
parent 1c306eefd8
commit 1652d1c009
3 changed files with 6 additions and 2 deletions
@@ -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