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

forceString: Show position info

This commit is contained in:
Eelco Dolstra 2014-04-04 21:14:11 +02:00
parent 27b44b8cf7
commit a5fe730940
6 changed files with 46 additions and 30 deletions

View file

@ -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;