Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nixexpr.hh File Reference
#include <map>
#include <span>
#include <memory>
#include <vector>
#include <memory_resource>
#include <algorithm>
#include "nix/expr/gc-small-vector.hh"
#include "nix/expr/value.hh"
#include "nix/expr/symbol-table.hh"
#include "nix/expr/eval-error.hh"
#include "nix/expr/static-string-data.hh"
#include "nix/util/pos-idx.hh"
#include "nix/expr/counter.hh"
#include "nix/util/pos-table.hh"
#include "nix/util/error.hh"
#include "nix/util/bump-memory-resource.hh"

Go to the source code of this file.

Classes

struct  nix::DocComment
struct  nix::AttrName
struct  nix::Expr
struct  nix::Expr::AstSymbols
struct  nix::ExprInt
struct  nix::ExprFloat
struct  nix::ExprString
struct  nix::ExprPath
struct  nix::ExprVar
struct  nix::ExprInheritFrom
struct  nix::ExprSelect
struct  nix::ExprOpHasAttr
struct  nix::ExprAttrs
struct  nix::ExprAttrs::AttrDef
struct  nix::ExprAttrs::DynamicAttrDef
struct  nix::ExprList
struct  nix::Formal
struct  nix::FormalsBuilder
struct  nix::Formals
struct  nix::ExprLambda
struct  nix::ExprCall
struct  nix::ExprLet
struct  nix::ExprWith
struct  nix::ExprIf
struct  nix::ExprAssert
struct  nix::ExprOpNot
struct  nix::ExprOpEq
struct  nix::ExprOpNEq
struct  nix::ExprOpAnd
struct  nix::ExprOpOr
struct  nix::ExprOpImpl
struct  nix::ExprOpConcatLists
struct  nix::ExprOpUpdate
struct  nix::ExprConcatStrings
struct  nix::ExprPos
struct  nix::ExprBlackHole
class  nix::Exprs
struct  nix::StaticEnv

Macros

#define COMMON_METHODS
#define MakeBinOpMembers(name, s)
#define MakeBinOp(name, s)

Typedefs

typedef std::vector< AttrName > nix::AttrSelectionPath
using nix::UpdateQueue = SmallTemporaryValueVector<conservativeStackReservation>
typedef uint32_t nix::Level
typedef uint32_t nix::Displacement

Functions

std::string nix::showAttrSelectionPath (const SymbolTable &symbols, std::span< const AttrName > attrPath)

Variables

ExprBlackHole nix::eBlackHole

Macro Definition Documentation

◆ COMMON_METHODS

#define COMMON_METHODS
Value:
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;

◆ MakeBinOp

#define MakeBinOp ( name,
s )
Value:
struct name : Expr \
{ \
MakeBinOpMembers(name, s) \
}

◆ MakeBinOpMembers

#define MakeBinOpMembers ( name,
s )
Value:
PosIdx pos; \
Expr *e1, *e2; \
name(Expr * e1, Expr * e2) \
: e1(e1) \
, e2(e2){}; \
name(const PosIdx & pos, Expr * e1, Expr * e2) \
: pos(pos) \
, e1(e1) \
, e2(e2){}; \
void show(const SymbolTable & symbols, std::ostream & str) const override \
{ \
str << "("; \
e1->show(symbols, str); \
str << " " s " "; \
e2->show(symbols, str); \
str << ")"; \
} \
void bindVars(EvalState & es, const std::shared_ptr<const StaticEnv> & env) override \
{ \
e1->bindVars(es, env); \
e2->bindVars(es, env); \
} \
void eval(EvalState & state, Env & env, Value & v) override; \
PosIdx getPos() const override \
{ \
return pos; \
}