about summary refs log tree commit diff
path: root/src/nix-env/nix-env.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-05-06T16·46+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-05-06T16·46+0000
commit84ce7ac76feab6e9a5c074bd1b9550ae543d1db8 (patch)
tree6fe85234390d62dd3e712cf2169d0963e4e87af2 /src/nix-env/nix-env.cc
parentc82782f9a5190c7489fb8e9bd6876b247b0de0bf (diff)
* Store attribute positions in the AST and report duplicate attribute
  errors with position info.
* For all positions, use the position of the first character of the
  first token, rather than the last character of the first token plus
  one.

Diffstat (limited to 'src/nix-env/nix-env.cc')
-rw-r--r--src/nix-env/nix-env.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 4a9df454d4ff..12a256a091f9 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -132,7 +132,7 @@ static void getAllExprs(EvalState & state,
             if (hasSuffix(attrName, ".nix"))
                 attrName = string(attrName, 0, attrName.size() - 4);
             attrs.attrs[state.symbols.create(attrName)] =
-                parseExprFromFile(state, absPath(path2));
+                ExprAttrs::Attr(parseExprFromFile(state, absPath(path2)), noPos);
         }
         else
             /* `path2' is a directory (with no default.nix in it);
@@ -153,7 +153,8 @@ static Expr * loadSourceExpr(EvalState & state, const Path & path)
        for a user to have a ~/.nix-defexpr directory that includes
        some system-wide directory). */
     ExprAttrs * attrs = new ExprAttrs;
-    attrs->attrs[state.symbols.create("_combineChannels")] = new ExprList();
+    attrs->attrs[state.symbols.create("_combineChannels")] =
+        ExprAttrs::Attr(new ExprList(), noPos);
     getAllExprs(state, path, *attrs);
     return attrs;
 }