20constexpr inline std::string_view
Pkgs =
"pkgs";
26constexpr inline std::string_view
Lib =
"lib";
35 [[nodiscard]]
const char *
what() const noexcept
override {
36 return "not an idiom";
43 [[nodiscard]]
const char *
what() const noexcept
override {
44 return "builtins are defined in the interpreter, not in the Nix files";
50 [[nodiscard]]
const char *
what() const noexcept
override {
51 return "no such variable";
56 [[nodiscard]]
const char *
what() const noexcept
override {
57 return "undefined variable";
72 [[nodiscard]]
const char *
what() const noexcept
override {
73 return "dynamic attribute path encountered";
78 [[nodiscard]]
const char *
what() const noexcept
override {
79 return "the base expression of the select is not a variable";
116std::pair<std::vector<std::string>, std::string>
130 std::vector<std::string> &
Path);
Types used in nixpkgs provider.
Lookup variable names, from it's parent scope.
A set of variable definitions, which may inherit parent environment.
Selector mkVarSelector(const nixf::ExprVar &Var, const nixf::VariableLookupAnalysis &VLA, const nixf::ParentMapAnalysis &PM)
Construct a nixd::Selector from Var.
Selector mkSelector(const nixf::AttrPath &AP, Selector BaseSelector)
Construct a nixd::Selector from AP.
constexpr std::string_view Pkgs
Hardcoded name for "pkgs.xxx", or "with pkgs;".
constexpr std::string_view Lib
Hardcoded name for nixpkgs "lib".
FindAttrPathResult findAttrPath(const nixf::Node &N, const nixf::ParentMapAnalysis &PM, std::vector< std::string > &Path)
Heuristically find attrpath suitable for "attrpath" completion.
const nixf::EnvNode * upEnv(const nixf::Node &Desc, const nixf::VariableLookupAnalysis &VLA, const nixf::ParentMapAnalysis &PM)
Search up until there are some node associated with "EnvNode".
bool havePackageScope(const nixf::Node &N, const nixf::VariableLookupAnalysis &VLA, const nixf::ParentMapAnalysis &PM)
Determine whether or not some node has enclosed "with pkgs; [ ]".
std::vector< std::string > Selector
A list of strings that "select"s into a attribute set.
std::pair< std::vector< std::string >, std::string > getScopeAndPrefix(const nixf::Node &N, const nixf::ParentMapAnalysis &PM)
get variable scope, and it's prefix name.
The attrpath has a dynamic name, thus it cannot be trivially transformed to "static" selector.
const char * what() const noexcept override
Exceptions scoped in nixd::mkIdiomSelector.
const char * what() const noexcept override
const char * what() const noexcept override
The pattern of this variable cannot be recognized by known idioms.
const char * what() const noexcept override
const char * what() const noexcept override
const char * what() const noexcept override