Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::ExprInheritFrom Struct Reference

#include <nixexpr.hh>

Inheritance diagram for nix::ExprInheritFrom:
nix::ExprVar nix::Expr

Public Member Functions

 ExprInheritFrom (PosIdx pos, Displacement displ)
void bindVars (EvalState &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)
Value * maybeThunk (EvalState &state, Env &env) override
PosIdx getPos () const override
void show (const SymbolTable &symbols, std::ostream &str) const override
void eval (EvalState &state, Env &env, Value &v) override
void bindVars (EvalState &es, const std::shared_ptr< const StaticEnv > &env) override
Public Member Functions inherited from nix::Expr
void eval (EvalState &state, Env &env, Value &v, std::string_view errorCtx)
virtual void evalForUpdate (EvalState &state, Env &env, UpdateQueue &q, std::string_view errorCtx)
virtual void setName (Symbol name)
virtual void setDocComment (DocComment docComment)
virtual void resetCursedOr ()
virtual void warnIfCursedOr (const SymbolTable &symbols, const PosTable &positions)

Additional Inherited Members

Public Attributes inherited from nix::ExprVar
PosIdx pos
Symbol name
ExprWith * fromWith = nullptr
Level level = 0
Displacement displ = 0
Static Public Attributes inherited from nix::Expr
static Counter nrExprs

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 ( EvalState & es,
const std::shared_ptr< const StaticEnv > & env )
overridevirtual

Reimplemented from nix::Expr.


The documentation for this struct was generated from the following files:
  • libexpr/include/nix/expr/nixexpr.hh
  • libexpr/nixexpr.cc