mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 16:00:09 +01:00
Move a little logic into TypeChecker to narrow what's exposed. (#938)
This commit is contained in:
@@ -50,13 +50,7 @@ void ExecProgram(Nonnull<Arena*> arena, AST ast, bool trace) {
|
||||
// (particularly templates) may require more passes.
|
||||
ResolveNames(arena, ast);
|
||||
ResolveControlFlow(ast);
|
||||
TypeChecker type_checker(arena, trace);
|
||||
TypeChecker::TypeCheckContext p = type_checker.TopLevel(&ast.declarations);
|
||||
TypeEnv top = p.types;
|
||||
Env ct_top = p.values;
|
||||
for (const auto decl : ast.declarations) {
|
||||
type_checker.TypeCheck(decl, top, ct_top);
|
||||
}
|
||||
TypeChecker(arena, trace).TypeCheck(ast);
|
||||
if (trace) {
|
||||
llvm::outs() << "\n";
|
||||
llvm::outs() << "********** type checking complete **********\n";
|
||||
|
||||
Reference in New Issue
Block a user