1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00

incorporate PosIdx changes, symbol changes.

This commit is contained in:
Ben Burdette 2022-04-29 10:02:17 -06:00
parent 6e19947993
commit 2a5632c70d
8 changed files with 204 additions and 125 deletions

View file

@ -278,7 +278,12 @@ struct ExprList : Expr
{
std::vector<Expr *> elems;
ExprList() { };
const PosIdx getPos() const { return pos; }
const PosIdx getPos() const
{ if (elems.empty())
return noPos;
else
return elems.front()->getPos();
}
COMMON_METHODS
};
@ -389,7 +394,7 @@ struct ExprOpNot : Expr
{
Expr * e;
ExprOpNot(Expr * e) : e(e) { };
const Pos* getPos() const { return 0; }
const PosIdx getPos() const { return noPos; }
COMMON_METHODS
};