1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 19:57:59 +02:00

posToXML(): Fix displaying paths

This commit is contained in:
Eelco Dolstra 2022-09-12 14:59:15 +02:00
parent 48a5879b63
commit 1b8065f255

View file

@ -24,8 +24,8 @@ static void printValueAsXML(EvalState & state, bool strict, bool location,
static void posToXML(EvalState & state, XMLAttrs & xmlAttrs, const Pos & pos)
{
// FIXME
//xmlAttrs["path"] = pos.file;
if (auto path = std::get_if<SourcePath>(&pos.origin))
xmlAttrs["path"] = path->path.abs();
xmlAttrs["line"] = (format("%1%") % pos.line).str();
xmlAttrs["column"] = (format("%1%") % pos.column).str();
}