1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

libexpr: store ExprLambda data in Expr::alloc

This commit is contained in:
Taeer Bar-Yam 2025-10-27 21:29:17 +01:00
parent 4a2fb18ba0
commit 3a3c062982
10 changed files with 88 additions and 61 deletions

View file

@ -149,10 +149,10 @@ static void printValueAsXML(
XMLAttrs attrs;
if (v.lambda().fun->arg)
attrs["name"] = state.symbols[v.lambda().fun->arg];
if (v.lambda().fun->formals->ellipsis)
if (v.lambda().fun->ellipsis)
attrs["ellipsis"] = "1";
XMLOpenElement _(doc, "attrspat", attrs);
for (auto & i : v.lambda().fun->formals->lexicographicOrder(state.symbols))
for (auto & i : v.lambda().fun->getFormalsLexicographic(state.symbols))
doc.writeEmptyElement("attr", singletonAttrs("name", state.symbols[i.name]));
} else
doc.writeEmptyElement("varpat", singletonAttrs("name", state.symbols[v.lambda().fun->arg]));