Refactor: TopDownAnalysisParameters -> TopDownAnalysisMode

No longer implements TypeLazinessToken (was unused)
This commit is contained in:
Pavel V. Talanov
2015-05-15 15:05:40 +03:00
parent d9c70b5927
commit 9d22a39924
16 changed files with 81 additions and 143 deletions
@@ -112,8 +112,6 @@ public class ReplInterpreter {
GlobalContextImpl context = ContextPackage.GlobalContext();
TopDownAnalysisParameters topDownAnalysisParameters = TopDownAnalysisParameters.create(true);
scriptDeclarationFactory = new ScriptMutableDeclarationProviderFactory();
ScopeProvider.AdditionalFileScopeProvider scopeProvider = new ScopeProvider.AdditionalFileScopeProvider() {
@@ -134,7 +132,7 @@ public class ReplInterpreter {
scopeProvider
);
this.topDownAnalysisContext = new TopDownAnalysisContext(topDownAnalysisParameters, DataFlowInfo.EMPTY);
this.topDownAnalysisContext = new TopDownAnalysisContext(TopDownAnalysisMode.LocalDeclarations, DataFlowInfo.EMPTY);
this.topDownAnalyzer = injector.getLazyTopDownAnalyzerForTopLevel();
this.resolveSession = injector.getResolveSession();
@@ -353,7 +351,7 @@ public class ReplInterpreter {
new FileBasedDeclarationProviderFactory(resolveSession.getStorageManager(), Collections.singletonList(psiFile)));
TopDownAnalysisContext context = topDownAnalyzer.analyzeDeclarations(
topDownAnalysisContext.getTopDownAnalysisParameters(),
topDownAnalysisContext.getTopDownAnalysisMode(),
Collections.singletonList(psiFile)
);