mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02:00
add pos to errorinfo, remove from hints
This commit is contained in:
parent
1b801cec40
commit
55eb717148
13 changed files with 507 additions and 194 deletions
|
@ -35,10 +35,15 @@ typedef enum {
|
|||
} Verbosity;
|
||||
|
||||
struct ErrPos {
|
||||
int line;
|
||||
int column;
|
||||
int line = 0;
|
||||
int column = 0;
|
||||
string file;
|
||||
|
||||
operator bool() const
|
||||
{
|
||||
return line != 0;
|
||||
}
|
||||
|
||||
template <class P>
|
||||
ErrPos& operator=(const P &pos)
|
||||
{
|
||||
|
@ -58,7 +63,7 @@ struct ErrPos {
|
|||
struct NixCode {
|
||||
ErrPos errPos;
|
||||
std::optional<string> prevLineOfCode;
|
||||
string errLineOfCode;
|
||||
std::optional<string> errLineOfCode;
|
||||
std::optional<string> nextLineOfCode;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue