aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/attr-path.hh
blob: eb00ffb93e47061e9eb1aa9ce5c6687d9bb4dfe9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once
///@file

#include "eval.hh"

#include <string>
#include <map>

namespace nix {

MakeError(AttrPathNotFound, Error);
MakeError(NoPositionInfo, Error);

std::pair<Value *, PosIdx> findAlongAttrPath(
    EvalState & state,
    const std::string & attrPath,
    Bindings & autoArgs,
    Value & vIn);

/**
 * Heuristic to find the filename and lineno or a nix value.
 */
std::pair<SourcePath, uint32_t> findPackageFilename(EvalState & state, Value & v, std::string what);

std::vector<Symbol> parseAttrPath(EvalState & state, std::string_view s);

}