Skip to content

Commit

Permalink
add nullable Expr argument
Browse files Browse the repository at this point in the history
  • Loading branch information
bburdette committed Oct 11, 2021
1 parent aad2714 commit 2ee1fa4
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 63 deletions.
4 changes: 2 additions & 2 deletions src/libcmd/command.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ EvalCommand::EvalCommand()
});
}
// extern std::function<void(const Error & error, const std::map<std::string, Value *> & env)> debuggerHook;
extern std::function<void(const Error & error, const Env & env)> debuggerHook;
extern std::function<void(const Error & error, const Env & env, const Expr & expr)> debuggerHook;

ref<EvalState> EvalCommand::getEvalState()
{
std::cout << "EvalCommand::getEvalState()" << startReplOnEvalErrors << std::endl;
if (!evalState) {
evalState = std::make_shared<EvalState>(searchPath, getStore());
if (startReplOnEvalErrors)
debuggerHook = [evalState{ref<EvalState>(evalState)}](const Error & error, const Env & env) {
debuggerHook = [evalState{ref<EvalState>(evalState)}](const Error & error, const Env & env, const Expr & expr) {
printError("%s\n\n" ANSI_BOLD "Starting REPL to allow you to inspect the current state of the evaluator.\n" ANSI_NORMAL, error.what());
// printEnvPosChain(env);
printEnvBindings(env);
Expand Down
Loading

0 comments on commit 2ee1fa4

Please sign in to comment.