Closed
Description
The current semantic analyzer is hard to understand and modify. Here some ideas for how to improve things:
- Create separate modules for the three different passes (say,
mypy.analyzer[123]
). - Don't pass a
SemanticAnalyzer
instance to the first and third passes. Instead, move any shared functionality to a utility class (or functions), and put them in a separate module such asmypy.analyzeutil
. - Rename the passes to, say,
SemanticAnalyzerPass[123]
.