docs(3p/nix/libexpr): Add comment on ExprSelect

This commit is contained in:
Vincent Ambo 2020-05-23 16:01:52 +01:00
parent bca0e34859
commit 39e72c27f1

View file

@ -147,6 +147,13 @@ struct ExprVar : Expr {
Value* maybeThunk(EvalState& state, Env& env); 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 { struct ExprSelect : Expr {
Pos pos; Pos pos;
Expr *e, *def; Expr *e, *def;