Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::ExprAttrs Struct Reference
Inheritance diagram for nix::ExprAttrs:
nix::Expr

Classes

struct  AttrDef
struct  DynamicAttrDef

Public Types

typedef std::pmr::map< Symbol, AttrDef > AttrDefs
typedef std::pmr::vector< DynamicAttrDef > DynamicAttrDefs

Public Member Functions

 ExprAttrs (const PosIdx &pos)
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
std::shared_ptr< const StaticEnv > bindInheritSources (EvalState &es, const std::shared_ptr< const StaticEnv > &env)
Env * buildInheritFromEnv (EvalState &state, Env &up)
void showBindings (const SymbolTable &symbols, std::ostream &str) const
void moveDataToAllocator (std::pmr::polymorphic_allocator< char > &alloc)
Public Member Functions inherited from nix::Expr
void eval (EvalState &state, Env &env, Value &v, std::string_view errorCtx)
virtual Value * maybeThunk (EvalState &state, Env &env)
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)

Public Attributes

bool recursive
PosIdx pos
std::optional< AttrDefs > attrs
std::unique_ptr< std::pmr::vector< Expr * > > inheritFromExprs
std::optional< DynamicAttrDefs > dynamicAttrs

Additional Inherited Members

Static Public Attributes inherited from nix::Expr
static Counter nrExprs

Member Function Documentation

◆ bindVars()

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

Reimplemented from nix::Expr.

◆ eval()

void nix::ExprAttrs::eval ( EvalState & state,
Env & env,
Value & v )
overridevirtual

Normal evaluation, implemented directly by all subclasses.

Reimplemented from nix::Expr.

◆ getPos()

PosIdx nix::ExprAttrs::getPos ( ) const
inlineoverridevirtual

Reimplemented from nix::Expr.

◆ show()

void nix::ExprAttrs::show ( const SymbolTable & symbols,
std::ostream & str ) const
overridevirtual

Reimplemented from nix::Expr.

Member Data Documentation

◆ attrs

std::optional<AttrDefs> nix::ExprAttrs::attrs

attrs will never be null. we use std::optional so that we can call emplace() to re-initialize the value with a new pmr::map using a different allocator (move assignment will copy into the old allocator)

◆ dynamicAttrs

std::optional<DynamicAttrDefs> nix::ExprAttrs::dynamicAttrs

dynamicAttrs will never be null. See comment on AttrDefs above.


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