formatting

This commit is contained in:
Ben Burdette 2022-03-16 12:09:47 -06:00
parent 3dfab6e534
commit 88a54108eb
3 changed files with 14 additions and 14 deletions

View file

@ -128,7 +128,7 @@ ref<EvalState> EvalCommand::getEvalState()
else else
{ {
auto iter = evalState->debugTraces.begin(); auto iter = evalState->debugTraces.begin();
if (iter != evalState->debugTraces.end()) { if (iter != evalState->debugTraces.end()) {
std::cout << "\n" << "" << iter->hint.str() << "\n"; std::cout << "\n" << "" << iter->hint.str() << "\n";
if (iter->pos.has_value() && (*iter->pos)) { if (iter->pos.has_value() && (*iter->pos)) {

View file

@ -114,10 +114,10 @@ public:
RootValue vCallFlake = nullptr; RootValue vCallFlake = nullptr;
RootValue vImportedDrvToDerivation = nullptr; RootValue vImportedDrvToDerivation = nullptr;
/* Debugger */
bool debugStop; bool debugStop;
bool debugQuit; bool debugQuit;
std::list<DebugTrace> debugTraces; std::list<DebugTrace> debugTraces;
void debug_throw(Error e); void debug_throw(Error e);
private: private:

View file

@ -715,20 +715,20 @@ static RegisterPrimOp primop_break({
}); });
if (debuggerHook && !state.debugTraces.empty()) if (debuggerHook && !state.debugTraces.empty())
{ {
auto &dt = state.debugTraces.front(); auto &dt = state.debugTraces.front();
debuggerHook(&error, dt.env, dt.expr); debuggerHook(&error, dt.env, dt.expr);
if (state.debugQuit) { if (state.debugQuit) {
// if the user elects to quit the repl, throw an exception. // if the user elects to quit the repl, throw an exception.
throw Error(ErrorInfo{ throw Error(ErrorInfo{
.level = lvlInfo, .level = lvlInfo,
.msg = hintfmt("quit from debugger"), .msg = hintfmt("quit from debugger"),
.errPos = pos, .errPos = noPos,
}); });
} }
// returning the value we were passed. // returning the value we were passed.
v = *args[0]; v = *args[0];
} }
} }
}); });