Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Semantic analyzer redesign #6204
We are planning to do a major update to how the semantic analyzer works. The main idea is to use "deferred nodes" to allow each AST node to be processed an arbitrary number of times until all dependencies are ready. This may be needed to bind names within import cycles, for example. This should allow us to fix various issues with forward references and import cycles. We also hope that it will make it relatively easy to support general recursive types.
While the new design is in development, we'll have two semantic analyzer implementations available. We'll replace the existing semantic analyzer with the new one once the latter works well enough. Before that the new semantic analyzer must be explicitly enabled with a command-line option.
The new design should be strictly better than the current one, but there will likely some backward compatibility issues with existing plugins.