about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/nixexpr.hh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libexpr/nixexpr.hh')
-rw-r--r--third_party/nix/src/libexpr/nixexpr.hh9
1 files changed, 8 insertions, 1 deletions
diff --git a/third_party/nix/src/libexpr/nixexpr.hh b/third_party/nix/src/libexpr/nixexpr.hh
index 6d5d4f5f55e0..3ac651c94548 100644
--- a/third_party/nix/src/libexpr/nixexpr.hh
+++ b/third_party/nix/src/libexpr/nixexpr.hh
@@ -147,6 +147,13 @@ struct ExprVar : Expr {
   Value* maybeThunk(EvalState& state, Env& env);
 };
 
+// [tazjin] I *think* that this struct describes the syntactic
+// construct for "selecting" something out of an attribute set, e.g.
+// `a.b.c` => ExprSelect{"b", "c"}.
+//
+// Each path element has got a pointer to an expression, which seems
+// to be the thing preceding its period, but afaict that is only set
+// for the first one in a path.
 struct ExprSelect : Expr {
   Pos pos;
   Expr *e, *def;
@@ -200,7 +207,7 @@ struct ExprList : Expr {
 
 struct Formal {
   Symbol name;
-  Expr* def; // def = default, not definition
+  Expr* def;  // def = default, not definition
   Formal(const Symbol& name, Expr* def) : name(name), def(def){};
 };