about summary refs log tree commit diff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-08-06T13·02+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-08-06T13·02+0000
commit54945a2950174ded83d58336061b4a9990cdbbfd (patch)
tree8789c505f73551e9a40d745cbb2858ddc683cd9c /src/libexpr/eval.cc
parentc8606664abe952f74985503c831d31ae7a7369bc (diff)
* Refactoring: move parseExprFromFile() and parseExprFromString() into
  the EvalState class.

Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r--src/libexpr/eval.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index acf5d7a8aed9..5701452f94f1 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -1,5 +1,4 @@
 #include "eval.hh"
-#include "parser.hh"
 #include "hash.hh"
 #include "util.hh"
 #include "store-api.hh"
@@ -427,14 +426,10 @@ void EvalState::evalFile(const Path & path, Value & v)
 {
     startNest(nest, lvlTalkative, format("evaluating file `%1%'") % path);
 
-    Expr * e = parseTrees[path];
-
-    if (!e) {
-        e = parseExprFromFile(*this, path);
-        parseTrees[path] = e;
-    }
+    Expr * e = parseExprFromFile(path);
     
     try {
+        /* !!! Maybe we should cache the evaluation result. */
         eval(e, v);
     } catch (Error & e) {
         addErrorPrefix(e, "while evaluating the file `%1%':\n", path);