From 11849a320e4f522b97fcdf09ff0940496880475b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 20 Aug 2014 17:00:17 +0200 Subject: Use proper quotes everywhere --- src/libexpr/eval.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/libexpr/eval.cc') diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index b752e1c75622..5cb6fc3cfe7b 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -396,7 +396,7 @@ inline Value * EvalState::lookupVar(Env * env, const ExprVar & var, bool noEval) return j->value; } if (!env->prevWith) - throwUndefinedVarError("undefined variable `%1%' at %2%", var.name, var.pos); + throwUndefinedVarError("undefined variable ‘%1%’ at %2%", var.name, var.pos); for (unsigned int l = env->prevWith; l; --l, env = env->up) ; } } @@ -537,12 +537,12 @@ void EvalState::evalFile(const Path & path, Value & v) return; } - startNest(nest, lvlTalkative, format("evaluating file `%1%'") % path2); + startNest(nest, lvlTalkative, format("evaluating file ‘%1%’") % path2); Expr * e = parseExprFromFile(path2); try { eval(e, v); } catch (Error & e) { - addErrorPrefix(e, "while evaluating the file `%1%':\n", path2); + addErrorPrefix(e, "while evaluating the file ‘%1%’:\n", path2); throw; } @@ -686,7 +686,7 @@ void ExprAttrs::eval(EvalState & state, Env & env, Value & v) Symbol nameSym = state.symbols.create(nameVal.string.s); Bindings::iterator j = v.attrs->find(nameSym); if (j != v.attrs->end()) - throwEvalError("dynamic attribute `%1%' at %2% already defined at %3%", nameSym, i->pos, *j->pos); + throwEvalError("dynamic attribute ‘%1%’ at %2% already defined at %3%", nameSym, i->pos, *j->pos); i->valueExpr->setName(nameSym); /* Keep sorted order so find can catch duplicates */ @@ -764,7 +764,7 @@ void ExprSelect::eval(EvalState & state, Env & env, Value & v) staticPath.push_back(AttrName(getName(*j, state, env))); for (j = j + 1; j != attrPath.end(); ++j) staticPath.push_back(*j); - throwEvalError("attribute `%1%' missing, at %2%", showAttrPath(staticPath), pos); + throwEvalError("attribute ‘%1%’ missing, at %2%", showAttrPath(staticPath), pos); } } vAttrs = j->value; @@ -776,7 +776,7 @@ void ExprSelect::eval(EvalState & state, Env & env, Value & v) } catch (Error & e) { if (pos2 && pos2->file != state.sDerivationNix) - addErrorPrefix(e, "while evaluating the attribute `%1%' at %2%:\n", + addErrorPrefix(e, "while evaluating the attribute ‘%1%’ at %2%:\n", showAttrPath(attrPath), *pos2); throw; } @@ -900,7 +900,7 @@ void EvalState::callFunction(Value & fun, Value & arg, Value & v, const Pos & po foreach (Formals::Formals_::iterator, i, lambda.formals->formals) { Bindings::iterator j = arg.attrs->find(i->name); if (j == arg.attrs->end()) { - if (!i->def) throwTypeError("%1% called without required argument `%2%', at %3%", + if (!i->def) throwTypeError("%1% called without required argument ‘%2%’, at %3%", lambda, i->name, pos); env2.values[displ++] = i->def->maybeThunk(*this, env2); } else { @@ -916,7 +916,7 @@ void EvalState::callFunction(Value & fun, Value & arg, Value & v, const Pos & po user. */ foreach (Bindings::iterator, i, *arg.attrs) if (lambda.formals->argNames.find(i->name) == lambda.formals->argNames.end()) - throwTypeError("%1% called with unexpected argument `%2%', at %3%", lambda, i->name, pos); + throwTypeError("%1% called with unexpected argument ‘%2%’, at %3%", lambda, i->name, pos); abort(); // can't happen } } @@ -963,7 +963,7 @@ void EvalState::autoCallFunction(Bindings & args, Value & fun, Value & res) if (j != args.end()) actualArgs->attrs->push_back(*j); else if (!i->def) - throwTypeError("cannot auto-call a function that has an argument without a default value (`%1%')", i->name); + throwTypeError("cannot auto-call a function that has an argument without a default value (‘%1%’)", i->name); } actualArgs->attrs->sort(); @@ -1233,10 +1233,10 @@ string EvalState::forceStringNoCtx(Value & v, const Pos & pos) string s = forceString(v, pos); if (v.string.context) { if (pos) - throwEvalError("the string `%1%' is not allowed to refer to a store path (such as `%2%'), at %3%", + throwEvalError("the string ‘%1%’ is not allowed to refer to a store path (such as ‘%2%’), at %3%", v.string.s, v.string.context[0], pos); else - throwEvalError("the string `%1%' is not allowed to refer to a store path (such as `%2%')", + throwEvalError("the string ‘%1%’ is not allowed to refer to a store path (such as ‘%2%’)", v.string.s, v.string.context[0]); } return s; @@ -1307,7 +1307,7 @@ string EvalState::coerceToString(const Pos & pos, Value & v, PathSet & context, string EvalState::copyPathToStore(PathSet & context, const Path & path) { if (nix::isDerivation(path)) - throwEvalError("file names are not allowed to end in `%1%'", drvExtension); + throwEvalError("file names are not allowed to end in ‘%1%’", drvExtension); Path dstPath; if (srcToStore[path] != "") @@ -1317,7 +1317,7 @@ string EvalState::copyPathToStore(PathSet & context, const Path & path) ? computeStorePathForPath(path).first : store->addToStore(path, true, htSHA256, defaultPathFilter, repair); srcToStore[path] = dstPath; - printMsg(lvlChatty, format("copied source `%1%' -> `%2%'") + printMsg(lvlChatty, format("copied source ‘%1%’ -> ‘%2%’") % path % dstPath); } @@ -1330,7 +1330,7 @@ Path EvalState::coerceToPath(const Pos & pos, Value & v, PathSet & context) { string path = coerceToString(pos, v, context, false, false); if (path == "" || path[0] != '/') - throwEvalError("string `%1%' doesn't represent an absolute path, at %1%", path, pos); + throwEvalError("string ‘%1%’ doesn't represent an absolute path, at %1%", path, pos); return path; } -- cgit 1.4.1