Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nixexpr.hh File Reference
#include <map>
#include <vector>
#include "value.hh"
#include "symbol-table.hh"
#include "eval-error.hh"
#include "pos-idx.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::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::ExprOpUpdate
 
struct  nix::ExprOpConcatLists
 
struct  nix::ExprConcatStrings
 
struct  nix::ExprPos
 
struct  nix::ExprBlackHole
 
struct  nix::StaticEnv
 

Macros

#define COMMON_METHODS
 
#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)
 

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;
friend class EvalState
Definition lexer.l:5728
friend class SymbolTable
Definition lexer.l:947
std::ostream & str
Definition lexer.l:1728
std::unordered_map< std::string_view, std::pair< const std::string *, uint32_t > > symbols
Definition lexer.l:1010

◆ MakeBinOp

#define MakeBinOp ( name,
s )
Value:
struct name : Expr \
{ \
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; } \
};
return s
Definition lexer.l:459
const std::string_view & name
Definition lexer.l:1709