Nix  2.93.0-dev
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::ExprInheritFrom Struct Reference

#include <nixexpr.hh>

Inheritance diagram for nix::ExprInheritFrom:
[legend]
Collaboration diagram for nix::ExprInheritFrom:
[legend]

Public Member Functions

 ExprInheritFrom (PosIdx pos, Displacement displ, ref< Expr > fromExpr)
 
JSON toJSON (SymbolTable const &symbols) const override
 
void bindVars (Evaluator &es, const std::shared_ptr< const StaticEnv > &env) override
 
- Public Member Functions inherited from nix::ExprVar
 ExprVar (Symbol name)
 
 ExprVar (const PosIdx &pos, Symbol name, bool needsRoot=false)
 
ValuemaybeThunk (EvalState &state, Env &env) override
 
- Public Member Functions inherited from nix::Expr
 Expr (const Expr &)=delete
 
Exproperator= (const Expr &)=delete
 
virtual void eval (EvalState &state, Env &env, Value &v)
 
virtual void setName (Symbol name)
 
PosIdx getPos () const
 

Public Attributes

ref< ExprfromExpr
 
- Public Attributes inherited from nix::ExprVar
Symbol name
 
ExprWithfromWith
 
Level level
 
Displacement displ
 
bool needsRoot
 
- Public Attributes inherited from nix::Expr
PosIdx pos
 

Additional Inherited Members

- Protected Member Functions inherited from nix::Expr
 Expr (Expr &&)=default
 
Exproperator= (Expr &&)=default
 
 Expr (const PosIdx pos)
 

Detailed Description

A pseudo-expression for the purpose of evaluating the from expression in inherit (from) syntax. Unlike normal variable references, the displacement is set during parsing, and always refers to ExprAttrs::inheritFromExprs (by itself or in ExprLet), whose values are put into their own Env.

Member Function Documentation

◆ bindVars()

void nix::ExprInheritFrom::bindVars ( Evaluator & es,
const std::shared_ptr< const StaticEnv > & env )
overridevirtual

Reimplemented from nix::Expr.

◆ toJSON()

JSON nix::ExprInheritFrom::toJSON ( SymbolTable const & symbols) const
overridevirtual

Reimplemented from nix::Expr.


The documentation for this struct was generated from the following files: