Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nixexpr.hh File Reference
#include <map>
#include <memory>
#include <vector>
#include "lix/libexpr/value.hh"
#include "lix/libexpr/symbol-table.hh"
#include "lix/libutil/json.hh"
#include "lix/libexpr/eval-error.hh"
#include "lix/libexpr/pos-idx.hh"
#include "lix/libutil/strings.hh"

Go to the source code of this file.

Classes

struct  nix::AttrName
struct  nix::ExprVisitor
struct  nix::Expr
struct  nix::Expr::AstSymbols
struct  nix::ExprDebugFrame
struct  nix::ExprLiteral
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::ExprSet
struct  nix::ExprReplBindings
struct  nix::ExprList
struct  nix::Pattern
struct  nix::SimplePattern
struct  nix::AttrsPattern
struct  nix::AttrsPattern::Formal
struct  nix::ExprLambda
struct  nix::ExprCall
struct  nix::ExprLet
struct  nix::ExprWith
struct  nix::ExprIf
struct  nix::ExprAssert
struct  nix::ExprOpNot
struct  nix::ExprPos
struct  nix::ExprBlackHole
struct  nix::StaticEnv

Macros

#define MakeBinOp(name, s)

Typedefs

typedef std::vector< AttrNamenix::AttrPath
typedef uint32_t nix::Level
typedef uint32_t nix::Displacement

Functions

std::string nix::showAttrPath (const SymbolTable &symbols, const AttrPath &attrPath)
JSON nix::printAttrPathToJson (const SymbolTable &symbols, const AttrPath &attrPath)
 nix::MakeBinOp (ExprOpEq, "==") MakeBinOp(ExprOpNEq

Macro Definition Documentation

◆ MakeBinOp

#define MakeBinOp ( name,
s )
Value:
struct name : Expr \
{ \
std::unique_ptr<Expr> e1, e2; \
name(std::unique_ptr<Expr> e1, std::unique_ptr<Expr> e2) : e1(std::move(e1)), e2(std::move(e2)) { }; \
name(const PosIdx & pos, std::unique_ptr<Expr> e1, std::unique_ptr<Expr> e2) : Expr(pos), e1(std::move(e1)), e2(std::move(e2)) { }; \
JSON toJSON(const SymbolTable & symbols) const override \
{ \
return { \
{"_type", #name}, \
{"e1", e1->toJSON(symbols)}, \
{"e2", e2->toJSON(symbols)} \
};\
} \
void accept(ExprVisitor & ev, std::unique_ptr<Expr> & ptr) override { ev.visit(*this, ptr); } \
void eval(EvalState & state, Env & env, Value & v) override; \
};