aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/nixexpr.hh
diff options
context:
space:
mode:
authorBen Burdette <bburdette@protonmail.com>2022-04-29 10:02:17 -0600
committerBen Burdette <bburdette@protonmail.com>2022-04-29 10:02:17 -0600
commit2a5632c70dcb686a7764c23a5f330fcb9a33c8a1 (patch)
tree95f4d9390881356c12270f6b23a8853e6ef585f7 /src/libexpr/nixexpr.hh
parent6e19947993119dec3c9fb9581150d1184948bae9 (diff)
incorporate PosIdx changes, symbol changes.
Diffstat (limited to 'src/libexpr/nixexpr.hh')
-rw-r--r--src/libexpr/nixexpr.hh9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh
index d275a51e9..82fff6dcf 100644
--- a/src/libexpr/nixexpr.hh
+++ b/src/libexpr/nixexpr.hh
@@ -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
};