diff options
Diffstat (limited to 'src/libexpr/nixexpr.hh')
-rw-r--r-- | src/libexpr/nixexpr.hh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh index 527589147e9c..9234e2970ffa 100644 --- a/src/libexpr/nixexpr.hh +++ b/src/libexpr/nixexpr.hh @@ -28,6 +28,10 @@ struct Pos Pos() : line(0), column(0) { }; Pos(const Symbol & file, unsigned int line, unsigned int column) : file(file), line(line), column(column) { }; + operator bool() const + { + return line != 0; + } bool operator < (const Pos & p2) const { if (!line) return p2.line; |