mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
* Strict evaluation and XML printing of lists.
This commit is contained in:
parent
943ab38a0d
commit
da25d80152
2 changed files with 16 additions and 4 deletions
|
@ -47,7 +47,7 @@ static void printTermAsXML(Expr e, XMLWriter & doc)
|
|||
XMLAttrs attrs;
|
||||
ATerm s;
|
||||
int i;
|
||||
ATermList as, formals;
|
||||
ATermList as, es, formals;
|
||||
ATerm body, pos;
|
||||
|
||||
if (matchStr(e, s))
|
||||
|
@ -84,6 +84,12 @@ static void printTermAsXML(Expr e, XMLWriter & doc)
|
|||
}
|
||||
}
|
||||
|
||||
else if (matchList(e, es)) {
|
||||
XMLOpenElement _(doc, "list");
|
||||
for (ATermIterator i(es); i; ++i)
|
||||
printTermAsXML(*i, doc);
|
||||
}
|
||||
|
||||
else if (matchFunction(e, formals, body, pos)) {
|
||||
XMLOpenElement _(doc, "function");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue