diff options
Diffstat (limited to 'src/fix-ng/fix.cc')
-rw-r--r-- | src/fix-ng/fix.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/fix-ng/fix.cc b/src/fix-ng/fix.cc index 9a8ff1513042..e13413bb4ad4 100644 --- a/src/fix-ng/fix.cc +++ b/src/fix-ng/fix.cc @@ -1,13 +1,12 @@ #include <map> #include <iostream> +#include "parser.hh" #include "globals.hh" #include "normalise.hh" #include "shared.hh" -typedef ATerm Expr; - typedef map<ATerm, ATerm> NormalForms; typedef map<Path, PathSet> PkgPaths; typedef map<Path, Hash> PkgHashes; @@ -406,9 +405,7 @@ static Expr evalFile(EvalState & state, const Path & relPath) { Path path = searchPath(state.searchDirs, relPath); Nest nest(lvlTalkative, format("evaluating file `%1%'") % path); - Expr e = ATreadFromNamedFile(path.c_str()); - if (!e) - throw Error(format("unable to read a term from `%1%'") % path); + Expr e = parseExprFromFile(path); return evalExpr(state, e); } |