mirror of
https://github.com/NixOS/nix
synced 2025-06-29 19:03:16 +02:00
Remove no_pos_tag
This commit is contained in:
parent
30be6445e6
commit
7da3a30c90
1 changed files with 3 additions and 3 deletions
|
@ -27,11 +27,10 @@ struct Pos
|
||||||
uint32_t line;
|
uint32_t line;
|
||||||
uint32_t column;
|
uint32_t column;
|
||||||
|
|
||||||
struct no_pos_tag {};
|
|
||||||
struct stdin_tag {};
|
struct stdin_tag {};
|
||||||
struct string_tag {};
|
struct string_tag {};
|
||||||
|
|
||||||
typedef std::variant<no_pos_tag, stdin_tag, string_tag, SourcePath> Origin;
|
typedef std::variant<stdin_tag, string_tag, SourcePath> Origin;
|
||||||
|
|
||||||
Origin origin;
|
Origin origin;
|
||||||
|
|
||||||
|
@ -67,7 +66,8 @@ public:
|
||||||
// current origins.back() can be reused or not.
|
// current origins.back() can be reused or not.
|
||||||
mutable uint32_t idx = std::numeric_limits<uint32_t>::max();
|
mutable uint32_t idx = std::numeric_limits<uint32_t>::max();
|
||||||
|
|
||||||
explicit Origin(uint32_t idx): idx(idx), origin{Pos::no_pos_tag()} {}
|
// Used for searching in PosTable::[].
|
||||||
|
explicit Origin(uint32_t idx): idx(idx), origin{Pos::stdin_tag()} {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const Pos::Origin origin;
|
const Pos::Origin origin;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue