1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

Refactor option handling

This commit is contained in:
Eelco Dolstra 2014-08-13 03:50:44 +02:00
parent 5bed74d1b0
commit 47e185847e
10 changed files with 503 additions and 531 deletions

View file

@ -5,11 +5,12 @@
namespace nix {
/* Some common option parsing between nix-env and nix-instantiate. */
bool parseOptionArg(const string & arg, Strings::iterator & i,
const Strings::iterator & argsEnd, EvalState & state,
Bindings & autoArgs);
bool parseAutoArgs(Strings::iterator & i,
const Strings::iterator & argsEnd, std::map<string, string> & res);
bool parseSearchPathArg(const string & arg, Strings::iterator & i,
void evalAutoArgs(EvalState & state, std::map<string, string> & in, Bindings & out);
bool parseSearchPathArg(Strings::iterator & i,
const Strings::iterator & argsEnd, Strings & searchPath);
Path lookupFileArg(EvalState & state, string s);