docs(3p/nix/libexpr): Add comment on ExprSelect
This commit is contained in:
parent
bca0e34859
commit
39e72c27f1
1 changed files with 8 additions and 1 deletions
9
third_party/nix/src/libexpr/nixexpr.hh
vendored
9
third_party/nix/src/libexpr/nixexpr.hh
vendored
|
@ -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;
|
||||||
|
@ -200,7 +207,7 @@ struct ExprList : Expr {
|
||||||
|
|
||||||
struct Formal {
|
struct Formal {
|
||||||
Symbol name;
|
Symbol name;
|
||||||
Expr* def; // def = default, not definition
|
Expr* def; // def = default, not definition
|
||||||
Formal(const Symbol& name, Expr* def) : name(name), def(def){};
|
Formal(const Symbol& name, Expr* def) : name(name), def(def){};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue