Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::ExprLambda Struct Reference
Inheritance diagram for nix::ExprLambda:
nix::Expr

Public Member Functions

 ExprLambda (PosIdx pos, std::unique_ptr< Pattern > pattern, std::unique_ptr< Expr > body)
void setName (Symbol name) override
std::string showNamePos (const EvalState &state) const
std::string getName (SymbolTable const &symbols) const
std::string getQuotedName (SymbolTable const &symbols) const
JSON toJSON (const SymbolTable &symbols) const override
void eval (EvalState &state, Env &env, Value &v) override
void accept (ExprVisitor &ev, std::unique_ptr< Expr > &ptr) override
Public Member Functions inherited from nix::Expr
 Expr (const Expr &)=delete
Expr & operator= (const Expr &)=delete
virtual ValuemaybeThunk (EvalState &state, Env &env)
PosIdx getPos () const
template<typename E>
E & cast ()
template<typename E>
E * try_cast ()

Public Attributes

Symbol name
std::unique_ptr< Patternpattern
std::unique_ptr< Expr > body
Public Attributes inherited from nix::Expr
PosIdx pos

Additional Inherited Members

Static Public Member Functions inherited from nix::Expr
static std::unique_ptr< Expr > finalize (std::unique_ptr< Expr > parsed, Evaluator &es, const std::shared_ptr< const StaticEnv > &env)
Protected Member Functions inherited from nix::Expr
 Expr (Expr &&)=default
Expr & operator= (Expr &&)=default
 Expr (const PosIdx pos)

Member Function Documentation

◆ accept()

void nix::ExprLambda::accept ( ExprVisitor & ev,
std::unique_ptr< Expr > & ptr )
inlineoverridevirtual

Implements nix::Expr.

◆ eval()

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

Reimplemented from nix::Expr.

◆ getName()

std::string nix::ExprLambda::getName ( SymbolTable const & symbols) const
inline

Returns the name of the lambda, or "anonymous lambda" if it doesn't have one.

◆ getQuotedName()

std::string nix::ExprLambda::getQuotedName ( SymbolTable const & symbols) const
inline

Returns the name of the lambda in single quotes, or "anonymous lambda" if it doesn't have one.

◆ setName()

void nix::ExprLambda::setName ( Symbol name)
overridevirtual

Reimplemented from nix::Expr.

◆ toJSON()

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

Reimplemented from nix::Expr.

Member Data Documentation

◆ name

Symbol nix::ExprLambda::name

Name of the lambda. This is set if the lambda is defined in a let-expression or an attribute set, such that there is a name. Lambdas may have a falsey symbol as the name if they are anonymous


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