nixd
|
Functions | |
void | initEval () |
std::optional< nix::Value > | getField (nix::EvalState &State, nix::Value &V, std::string_view Field) |
std::optional< std::string_view > | getFieldString (nix::EvalState &State, nix::Value &V, std::string_view Field) |
bool | checkField (nix::EvalState &State, nix::Value &V, std::string_view Field, std::string_view Pred) |
Check if value V is an attrset, has the field, and equals to Pred . | |
bool | checkType (nix::EvalState &State, nix::Value &V, std::string_view Pred) |
Check if value is an attrset, and it's "_type" equals to Pred . | |
bool | isOption (nix::EvalState &State, nix::Value &V) |
bool | isDerivation (nix::EvalState &State, nix::Value &V) |
std::string | attrPathStr (nix::EvalState &State, nix::Value &V, const std::string &AttrPath) |
std::vector< nix::Symbol > | toSymbols (nix::SymbolTable &STable, const std::vector< std::string > &Names) |
Transform a vector of string into a vector of nix symbols. | |
std::vector< nix::Symbol > | toSymbols (nix::SymbolTable &STable, const std::vector< std::string_view > &Names) |
Transform a vector of string into a vector of nix symbols. | |
nix::Value & | selectAttr (nix::EvalState &State, nix::Value &V, nix::Symbol Attr) |
Select attribute Attr . | |
nix::Value & | selectOption (nix::EvalState &State, nix::Value &V, nix::Symbol Attr) |
nix::Value & | selectAttrPath (nix::EvalState &State, nix::Value &V, std::vector< nix::Symbol >::const_iterator Begin, std::vector< nix::Symbol >::const_iterator End) |
Given an attrpath in nix::Value V , select it. | |
nix::Value | selectOptions (nix::EvalState &State, nix::Value &V, std::vector< nix::Symbol >::const_iterator Begin, std::vector< nix::Symbol >::const_iterator End) |
Select the option declaration list, V , dive into "submodules". | |
nix::Value | selectOptions (nix::EvalState &State, nix::Value &V, const std::vector< nix::Symbol > &AttrPath) |
nix::Value & | selectSymbols (nix::EvalState &State, nix::Value &V, const std::vector< nix::Symbol > &AttrPath) |
Given an attrpath in nix::Value V , select it. | |
nix::Value & | selectStrings (nix::EvalState &State, nix::Value &V, const std::vector< std::string > &AttrPath) |
Given an attrpath in nix::Value V , select it. | |
nix::Value & | selectStringViews (nix::EvalState &State, nix::Value &V, const std::vector< std::string_view > &AttrPath) |
Given an attrpath in nix::Value V , select it. | |
std::string nixt::attrPathStr | ( | nix::EvalState & | State, |
nix::Value & | V, | ||
const std::string & | AttrPath ) |
bool nixt::checkField | ( | nix::EvalState & | State, |
nix::Value & | V, | ||
std::string_view | Field, | ||
std::string_view | Pred ) |
Check if value V
is an attrset, has the field, and equals to Pred
.
Definition at line 36 of file Value.cpp.
References getFieldString().
Referenced by checkType(), isDerivation(), and selectOptions().
bool nixt::checkType | ( | nix::EvalState & | State, |
nix::Value & | V, | ||
std::string_view | Pred ) |
Check if value is an attrset, and it's "_type" equals to Pred
.
Definition at line 41 of file Value.cpp.
References checkField().
Referenced by isOption().
std::optional< nix::Value > nixt::getField | ( | nix::EvalState & | State, |
nix::Value & | V, | ||
std::string_view | Field ) |
Definition at line 10 of file Value.cpp.
Referenced by getFieldString().
std::optional< std::string_view > nixt::getFieldString | ( | nix::EvalState & | State, |
nix::Value & | V, | ||
std::string_view | Field ) |
|
inline |
Definition at line 15 of file InitEval.h.
Referenced by main().
bool nixt::isDerivation | ( | nix::EvalState & | State, |
nix::Value & | V ) |
Definition at line 50 of file Value.cpp.
References checkField().
bool nixt::isOption | ( | nix::EvalState & | State, |
nix::Value & | V ) |
Definition at line 46 of file Value.cpp.
References checkType().
Referenced by nixd::AttrSetProvider::onOptionComplete(), and selectOptions().
nix::Value & nixt::selectAttr | ( | nix::EvalState & | State, |
nix::Value & | V, | ||
nix::Symbol | Attr ) |
Select attribute Attr
.
Definition at line 84 of file Value.cpp.
Referenced by selectAttrPath(), and selectOptions().
nix::Value & nixt::selectAttrPath | ( | nix::EvalState & | State, |
nix::Value & | V, | ||
std::vector< nix::Symbol >::const_iterator | Begin, | ||
std::vector< nix::Symbol >::const_iterator | End ) |
Given an attrpath in nix::Value V
, select it.
Definition at line 102 of file Value.cpp.
References selectAttr(), and selectAttrPath().
Referenced by selectAttrPath(), and selectSymbols().
nix::Value & nixt::selectOption | ( | nix::EvalState & | State, |
nix::Value & | V, | ||
nix::Symbol | Attr ) |
|
inline |
Definition at line 49 of file Value.h.
References selectOptions().
nix::Value nixt::selectOptions | ( | nix::EvalState & | State, |
nix::Value & | V, | ||
std::vector< nix::Symbol >::const_iterator | Begin, | ||
std::vector< nix::Symbol >::const_iterator | End ) |
Select the option declaration list, V
, dive into "submodules".
Definition at line 159 of file Value.cpp.
References checkField(), isOption(), selectAttr(), and selectOptions().
Referenced by nixd::AttrSetProvider::onOptionComplete(), nixd::AttrSetProvider::onOptionInfo(), selectOptions(), and selectOptions().
|
inline |
Given an attrpath in nix::Value V
, select it.
Definition at line 61 of file Value.h.
References selectSymbols(), and toSymbols().
Referenced by nixd::AttrSetProvider::onAttrPathComplete(), and nixd::AttrSetProvider::onAttrPathInfo().
|
inline |
Given an attrpath in nix::Value V
, select it.
Definition at line 68 of file Value.h.
References selectSymbols(), and toSymbols().
|
inline |
Given an attrpath in nix::Value V
, select it.
Definition at line 55 of file Value.h.
References selectAttrPath().
Referenced by selectStrings(), and selectStringViews().
std::vector< nix::Symbol > nixt::toSymbols | ( | nix::SymbolTable & | STable, |
const std::vector< std::string > & | Names ) |
Transform a vector of string into a vector of nix symbols.
Definition at line 63 of file Value.cpp.
Referenced by nixd::AttrSetProvider::onOptionComplete(), nixd::AttrSetProvider::onOptionInfo(), selectStrings(), and selectStringViews().