1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

don't use full Pos for findPackageFilename/editorFor

only file and line of the returned position were ever used, it wasn't actually
used a position. as such we may as well use a path+int pair for only those two
values and remove a use of Pos that would not work well with a position table.
This commit is contained in:
pennae 2022-03-04 20:54:50 +01:00
parent 38de79fcf7
commit 39df15fb8e
6 changed files with 29 additions and 31 deletions

View file

@ -17,7 +17,7 @@ std::pair<Value *, Pos> findAlongAttrPath(
Value & vIn);
/* Heuristic to find the filename and lineno or a nix value. */
Pos findPackageFilename(EvalState & state, Value & v, std::string what);
std::pair<std::string, uint32_t> findPackageFilename(EvalState & state, Value & v, std::string what);
std::vector<Symbol> parseAttrPath(EvalState & state, std::string_view s);