mirror of
https://github.com/NixOS/nix
synced 2025-06-25 23:11:16 +02:00
Merge branch 'master' into debug-exploratory-PR
This commit is contained in:
commit
a47de1ac37
137 changed files with 14235 additions and 4404 deletions
|
@ -354,8 +354,8 @@ struct ExprConcatStrings : Expr
|
|||
{
|
||||
Pos pos;
|
||||
bool forceString;
|
||||
vector<Expr *> * es;
|
||||
ExprConcatStrings(const Pos & pos, bool forceString, vector<Expr *> * es)
|
||||
vector<std::pair<Pos, Expr *> > * es;
|
||||
ExprConcatStrings(const Pos & pos, bool forceString, vector<std::pair<Pos, Expr *> > * es)
|
||||
: pos(pos), forceString(forceString), es(es) { };
|
||||
Pos* getPos() { return &pos; }
|
||||
COMMON_METHODS
|
||||
|
@ -392,6 +392,13 @@ struct StaticEnv
|
|||
[](const Vars::value_type & a, const Vars::value_type & b) { return a.first < b.first; });
|
||||
}
|
||||
|
||||
void deduplicate()
|
||||
{
|
||||
const auto last = std::unique(vars.begin(), vars.end(),
|
||||
[] (const Vars::value_type & a, const Vars::value_type & b) { return a.first == b.first; });
|
||||
vars.erase(last, vars.end());
|
||||
}
|
||||
|
||||
Vars::const_iterator find(const Symbol & name) const
|
||||
{
|
||||
Vars::value_type key(name, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue