mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
* Indented strings.
This commit is contained in:
parent
a60317f20f
commit
d4f0b0fc6c
7 changed files with 65 additions and 70 deletions
|
@ -15,6 +15,11 @@ std::ostream & operator << (std::ostream & str, Expr & e)
|
|||
}
|
||||
|
||||
|
||||
void Expr::show(std::ostream & str)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
void ExprInt::show(std::ostream & str)
|
||||
{
|
||||
str << n;
|
||||
|
@ -152,20 +157,6 @@ ATerm bottomupRewrite(TermFun & f, ATerm e)
|
|||
}
|
||||
|
||||
|
||||
Expr makeAttrs(const ATermMap & attrs)
|
||||
{
|
||||
ATermList bnds = ATempty;
|
||||
for (ATermMap::const_iterator i = attrs.begin(); i != attrs.end(); ++i) {
|
||||
Expr e;
|
||||
ATerm pos;
|
||||
if (!matchAttrRHS(i->value, e, pos))
|
||||
abort(); /* can't happen */
|
||||
bnds = ATinsert(bnds, makeBind(i->key, e, pos));
|
||||
}
|
||||
return makeAttrs(bnds);
|
||||
}
|
||||
|
||||
|
||||
static void varsBoundByPattern(ATermMap & map, Pattern pat)
|
||||
{
|
||||
ATerm name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue