diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-08-06T13·02+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-08-06T13·02+0000 |
commit | 54945a2950174ded83d58336061b4a9990cdbbfd (patch) | |
tree | 8789c505f73551e9a40d745cbb2858ddc683cd9c /src/nix-instantiate/nix-instantiate.cc | |
parent | c8606664abe952f74985503c831d31ae7a7369bc (diff) |
* Refactoring: move parseExprFromFile() and parseExprFromString() into
the EvalState class.
Diffstat (limited to 'src/nix-instantiate/nix-instantiate.cc')
-rw-r--r-- | src/nix-instantiate/nix-instantiate.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc index 3d3b643cfd6e..1f9059539188 100644 --- a/src/nix-instantiate/nix-instantiate.cc +++ b/src/nix-instantiate/nix-instantiate.cc @@ -1,7 +1,6 @@ #include "globals.hh" #include "shared.hh" #include "eval.hh" -#include "parser.hh" #include "get-drvs.hh" #include "attr-path.hh" #include "value-to-xml.hh" @@ -28,7 +27,7 @@ static Expr * parseStdin(EvalState & state) startNest(nest, lvlTalkative, format("parsing standard input")); string s, s2; while (getline(std::cin, s2)) s += s2 + "\n"; - return parseExprFromString(state, s, absPath(".")); + return state.parseExprFromString(s, absPath(".")); } @@ -139,7 +138,7 @@ void run(Strings args) foreach (Strings::iterator, i, files) { Path path = absPath(*i); - Expr * e = parseExprFromFile(state, path); + Expr * e = state.parseExprFromFile(path); processExpr(state, attrPaths, parseOnly, strict, autoArgs, evalOnly, xmlOutput, xmlOutputSourceLocation, e); } |