mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02:00
print LOC for stdin, string args
This commit is contained in:
parent
85ce455b85
commit
6a420d672c
6 changed files with 97 additions and 36 deletions
|
@ -32,10 +32,18 @@ typedef enum {
|
|||
lvlVomit
|
||||
} Verbosity;
|
||||
|
||||
typedef enum {
|
||||
foFile,
|
||||
foStdin,
|
||||
foString
|
||||
} FileOrigin;
|
||||
|
||||
|
||||
struct ErrPos {
|
||||
int line = 0;
|
||||
int column = 0;
|
||||
string file;
|
||||
FileOrigin origin;
|
||||
|
||||
operator bool() const
|
||||
{
|
||||
|
@ -45,6 +53,7 @@ struct ErrPos {
|
|||
template <class P>
|
||||
ErrPos& operator=(const P &pos)
|
||||
{
|
||||
origin = pos.origin;
|
||||
line = pos.line;
|
||||
column = pos.column;
|
||||
file = pos.file;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue