forked from lix-project/lix
comments
This commit is contained in:
parent
5bc97fdfa6
commit
7ccb2700c0
|
@ -121,59 +121,9 @@ ref<EvalState> EvalCommand::getEvalState()
|
|||
|
||||
evalState->debugMode = startReplOnEvalErrors;
|
||||
|
||||
// TODO move this somewhere else. Its only here to get the evalState ptr!
|
||||
if (startReplOnEvalErrors) {
|
||||
evalState->debugRepl = &runRepl;
|
||||
};
|
||||
// // debuggerHook = [evalState{ref<EvalState>(evalState)}](const Error * error, const Env & env, const Expr & expr) {
|
||||
// debuggerHook = [](EvalState & evalState, const Error * error, const Env & env, const Expr & expr) {
|
||||
// auto dts =
|
||||
// error && expr.getPos()
|
||||
// ? std::make_unique<DebugTraceStacker>(
|
||||
// evalState,
|
||||
// DebugTrace {
|
||||
// .pos = error->info().errPos ? *error->info().errPos : evalState.positions[expr.getPos()],
|
||||
// .expr = expr,
|
||||
// .env = env,
|
||||
// .hint = error->info().msg,
|
||||
// .isError = true
|
||||
// })
|
||||
// : nullptr;
|
||||
|
||||
// if (error)
|
||||
// printError("%s\n\n" ANSI_BOLD "Starting REPL to allow you to inspect the current state of the evaluator.\n" ANSI_NORMAL, error->what());
|
||||
|
||||
// auto se = evalState.getStaticEnv(expr);
|
||||
// if (se) {
|
||||
// auto vm = mapStaticEnvBindings(evalState.symbols, *se.get(), env);
|
||||
// runRepl(evalState, *vm);
|
||||
// }
|
||||
// if (startReplOnEvalErrors)
|
||||
|
||||
// // debuggerHook = [evalState{ref<EvalState>(evalState)}](const Error * error, const Env & env, const Expr & expr) {
|
||||
// debuggerHook = [](EvalState & evalState, const Error * error, const Env & env, const Expr & expr) {
|
||||
// auto dts =
|
||||
// error && expr.getPos()
|
||||
// ? std::make_unique<DebugTraceStacker>(
|
||||
// evalState,
|
||||
// DebugTrace {
|
||||
// .pos = error->info().errPos ? *error->info().errPos : evalState.positions[expr.getPos()],
|
||||
// .expr = expr,
|
||||
// .env = env,
|
||||
// .hint = error->info().msg,
|
||||
// .isError = true
|
||||
// })
|
||||
// : nullptr;
|
||||
|
||||
// if (error)
|
||||
// printError("%s\n\n" ANSI_BOLD "Starting REPL to allow you to inspect the current state of the evaluator.\n" ANSI_NORMAL, error->what());
|
||||
|
||||
// auto se = evalState.getStaticEnv(expr);
|
||||
// if (se) {
|
||||
// auto vm = mapStaticEnvBindings(evalState.symbols, *se.get(), env);
|
||||
// runRepl(evalState, *vm);
|
||||
// }
|
||||
// };
|
||||
}
|
||||
return ref<EvalState>(evalState);
|
||||
}
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
/* Launch the nix debugger */
|
||||
|
||||
// std::function<void(EvalState & evalState,const Error * error, const Env & env, const Expr & expr)> debuggerHook;
|
||||
|
||||
/* Displaying abstract syntax trees. */
|
||||
|
||||
static void showString(std::ostream & str, std::string_view s)
|
||||
|
|
|
@ -22,8 +22,6 @@ MakeError(UndefinedVarError, Error);
|
|||
MakeError(MissingArgumentError, EvalError);
|
||||
MakeError(RestrictedPathError, Error);
|
||||
|
||||
// extern std::function<void(EvalState & evalState, const Error * error, const Env & env, const Expr & expr)> debuggerHook;
|
||||
|
||||
/* Position objects. */
|
||||
|
||||
struct Pos
|
||||
|
|
Loading…
Reference in a new issue