Hide Interpreter in .cpp (#1036)

This improves encapsulation, and makes Interpreter lifetimes clearer (and shorter).

Co-authored-by: Jon Meow <46229924+jonmeow@users.noreply.github.com>
This commit is contained in:
Geoff Romer
2022-01-26 09:57:55 -08:00
committed by GitHub
co-authored by Jon Meow
parent 6a4901a995
commit 1723b4e0b2
7 changed files with 158 additions and 140 deletions
@@ -41,7 +41,7 @@ void ExecProgram(Nonnull<Arena*> arena, AST ast, bool trace) {
}
llvm::outs() << "********** starting execution **********\n";
}
int result = Interpreter(arena, trace).InterpProgram(ast);
int result = InterpProgram(ast, arena, trace);
llvm::outs() << "result: " << result << "\n";
}