mirror of
https://github.com/NixOS/nix
synced 2025-06-28 13:41:15 +02:00
Origin: Use SourcePath
This commit is contained in:
parent
94812cca98
commit
a9759407e5
9 changed files with 22 additions and 23 deletions
|
@ -24,8 +24,8 @@ static void printValueAsXML(EvalState & state, bool strict, bool location,
|
|||
|
||||
static void posToXML(EvalState & state, XMLAttrs & xmlAttrs, const Pos & pos)
|
||||
{
|
||||
if (auto path = std::get_if<Path>(&pos.origin))
|
||||
xmlAttrs["path"] = *path;
|
||||
if (auto path = std::get_if<SourcePath>(&pos.origin))
|
||||
xmlAttrs["path"] = path->path.abs();
|
||||
xmlAttrs["line"] = fmt("%1%", pos.line);
|
||||
xmlAttrs["column"] = fmt("%1%", pos.column);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue