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

* Use a symbol table to represent identifiers and attribute names

efficiently.  The symbol table ensures that there is only one copy
  of each symbol, thus allowing symbols to be compared efficiently
  using a pointer equality test.
This commit is contained in:
Eelco Dolstra 2010-04-13 12:25:42 +00:00
parent 10e8b1fd15
commit ac1e8f40d4
15 changed files with 228 additions and 101 deletions

View file

@ -28,7 +28,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(s, absPath("."));
return parseExprFromString(state, s, absPath("."));
}
@ -136,7 +136,7 @@ void run(Strings args)
foreach (Strings::iterator, i, files) {
Path path = absPath(*i);
Expr * e = parseExprFromFile(path);
Expr * e = parseExprFromFile(state, path);
processExpr(state, attrPaths, parseOnly, strict, autoArgs,
evalOnly, xmlOutput, e);
}