diff options
author | Ben Burdette <bburdette@gmail.com> | 2020-05-20 22:18:26 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2020-05-20 22:18:26 -0600 |
commit | 6a420d672ca690ef4235ac7a5833c1789a7d8b10 (patch) | |
tree | e9adbc63c159896bbbdc332800986b37c7d04e9b /src/libutil/error.hh | |
parent | 85ce455b854761b1fd4985ed21ef5a8881eb3c11 (diff) |
print LOC for stdin, string args
Diffstat (limited to 'src/libutil/error.hh')
-rw-r--r-- | src/libutil/error.hh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libutil/error.hh b/src/libutil/error.hh index b374c2780..d60c0fefe 100644 --- a/src/libutil/error.hh +++ b/src/libutil/error.hh @@ -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; |