mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +01:00
Support range-based for loop over list values
This commit is contained in:
parent
ca82967ee3
commit
b6c8e57056
10 changed files with 103 additions and 79 deletions
|
|
@ -122,8 +122,8 @@ static void printValueAsXML(EvalState & state, bool strict, bool location,
|
|||
|
||||
case nList: {
|
||||
XMLOpenElement _(doc, "list");
|
||||
for (unsigned int n = 0; n < v.listSize(); ++n)
|
||||
printValueAsXML(state, strict, location, *v.listElems()[n], doc, context, drvsSeen, pos);
|
||||
for (auto v2 : v.listItems())
|
||||
printValueAsXML(state, strict, location, *v2, doc, context, drvsSeen, pos);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue