diff options
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/eval.cc | 12 | ||||
-rw-r--r-- | src/libexpr/nixexpr.cc | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 294168392..10dba69e7 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -730,7 +730,7 @@ void printWithBindings(const SymbolTable &st, const Env &env) { if (env.type == Env::HasWithAttrs) { - std::cout << "with: "; + std::cout << "with: "; std::cout << ANSI_MAGENTA; Bindings::iterator j = env.values[0]->attrs->begin(); while (j != env.values[0]->attrs->end()) { @@ -747,13 +747,13 @@ void printEnvBindings(const SymbolTable &st, const StaticEnv &se, const Env &env std::cout << "Env level " << lvl << std::endl; if (se.up && env.up) { - std::cout << "static: "; + std::cout << "static: "; printStaticEnvBindings(st, se); printWithBindings(st, env); std::cout << std::endl; printEnvBindings(st, *se.up, *env.up, ++lvl); } - else + else { std::cout << ANSI_MAGENTA; // for the top level, don't print the double underscore ones; they are in builtins. @@ -784,7 +784,7 @@ void mapStaticEnvBindings(const SymbolTable &st, const StaticEnv &se, const Env { // add bindings for the next level up first, so that the bindings for this level // override the higher levels. - // The top level bindings (builtins) are skipped since they are added for us by initEnv() + // The top level bindings (builtins) are skipped since they are added for us by initEnv() if (env.up && se.up) { mapStaticEnvBindings(st, *se.up, *env.up, vm); @@ -1086,13 +1086,13 @@ void EvalState::addErrorTrace(Error & e, const PosIdx pos, const char * s, const e.addTrace(positions[pos], s, s2); } -std::unique_ptr<DebugTraceStacker> makeDebugTraceStacker(EvalState &state, Expr &expr, Env &env, +std::unique_ptr<DebugTraceStacker> makeDebugTraceStacker(EvalState &state, Expr &expr, Env &env, std::optional<ErrPos> pos, const char * s, const std::string & s2) { return std::unique_ptr<DebugTraceStacker>( new DebugTraceStacker( state, - DebugTrace + DebugTrace {.pos = pos, .expr = expr, .env = env, diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc index c6e545729..5624c4780 100644 --- a/src/libexpr/nixexpr.cc +++ b/src/libexpr/nixexpr.cc @@ -352,7 +352,7 @@ void ExprVar::bindVars(const EvalState & es, const std::shared_ptr<const StaticE /* Otherwise, the variable must be obtained from the nearest enclosing `with'. If there is no `with', then we can issue an "undefined variable" error now. */ - if (withLevel == -1) + if (withLevel == -1) { throw UndefinedVarError({ .msg = hintfmt("undefined variable '%1%'", es.symbols[name]), @@ -392,7 +392,7 @@ void ExprAttrs::bindVars(const EvalState & es, const std::shared_ptr<const Stati staticenv = env; if (recursive) { - auto newEnv = std::shared_ptr<StaticEnv>(new StaticEnv(false, env.get(), recursive ? attrs.size() : 0)); + auto newEnv = std::shared_ptr<StaticEnv>(new StaticEnv(false, env.get(), recursive ? attrs.size() : 0)); Displacement displ = 0; for (auto & i : attrs) |