mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02:00
nixCode -> LinesOfCode
This commit is contained in:
parent
1d43a6e123
commit
00fe653ea5
3 changed files with 67 additions and 55 deletions
|
@ -56,6 +56,13 @@ typedef enum {
|
|||
foString
|
||||
} FileOrigin;
|
||||
|
||||
// the lines of code surrounding an error.
|
||||
struct LinesOfCode {
|
||||
std::optional<string> prevLineOfCode;
|
||||
std::optional<string> errLineOfCode;
|
||||
std::optional<string> nextLineOfCode;
|
||||
};
|
||||
|
||||
// ErrPos indicates the location of an error in a nix file.
|
||||
struct ErrPos {
|
||||
int line = 0;
|
||||
|
@ -86,13 +93,6 @@ struct ErrPos {
|
|||
}
|
||||
};
|
||||
|
||||
struct NixCode {
|
||||
ErrPos errPos;
|
||||
std::optional<string> prevLineOfCode;
|
||||
std::optional<string> errLineOfCode;
|
||||
std::optional<string> nextLineOfCode;
|
||||
};
|
||||
|
||||
struct Trace {
|
||||
std::optional<ErrPos> pos;
|
||||
hintformat hint;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue