aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/nixexpr.hh
diff options
context:
space:
mode:
authorQyriad <qyriad@qyriad.me>2024-07-02 17:29:19 -0600
committerQyriad <qyriad@qyriad.me>2024-07-04 15:55:38 -0600
commit4f0c27abe159c69db15f968607bc26de5ba1034f (patch)
tree0d24ec1149fbf9e7d3453ffeab936d1c912ed608 /src/libexpr/nixexpr.hh
parente040b762a48f022b1ea4080020083f7367cf3ee5 (diff)
give ExprInheritFrom a handle to what its standing in for
Change-Id: I12088e0b618407e5432523bbc97be63c8d6fce62
Diffstat (limited to 'src/libexpr/nixexpr.hh')
-rw-r--r--src/libexpr/nixexpr.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh
index 418f888b3..703a32e8f 100644
--- a/src/libexpr/nixexpr.hh
+++ b/src/libexpr/nixexpr.hh
@@ -144,7 +144,10 @@ struct ExprVar : Expr
*/
struct ExprInheritFrom : ExprVar
{
- ExprInheritFrom(PosIdx pos, Displacement displ): ExprVar(pos, {})
+ ref<Expr> fromExpr;
+
+ ExprInheritFrom(PosIdx pos, Displacement displ, ref<Expr> fromExpr)
+ : ExprVar(pos, {}), fromExpr(fromExpr)
{
this->level = 0;
this->displ = displ;
@@ -222,7 +225,7 @@ struct ExprAttrs : Expr
};
typedef std::map<Symbol, AttrDef> AttrDefs;
AttrDefs attrs;
- std::unique_ptr<std::vector<std::unique_ptr<Expr>>> inheritFromExprs;
+ std::unique_ptr<std::vector<ref<Expr>>> inheritFromExprs;
struct DynamicAttrDef {
std::unique_ptr<Expr> nameExpr, valueExpr;
PosIdx pos;