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

nixCode -> LinesOfCode

This commit is contained in:
Ben Burdette 2020-06-24 08:33:53 -06:00
parent 1d43a6e123
commit 00fe653ea5
3 changed files with 67 additions and 55 deletions

View file

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