1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 14:53:16 +02:00

Merge remote-tracking branch 'origin/master' into tmp

This commit is contained in:
Eelco Dolstra 2022-12-20 13:50:16 +01:00
commit 15d2e0e63b
12 changed files with 85 additions and 85 deletions

View file

@ -27,10 +27,11 @@ struct Pos
uint32_t line;
uint32_t column;
struct stdin_tag {};
struct string_tag {};
struct none_tag { };
struct Stdin { ref<std::string> source; };
struct String { ref<std::string> source; };
typedef std::variant<stdin_tag, string_tag, SourcePath> Origin;
typedef std::variant<none_tag, Stdin, String, SourcePath> Origin;
Origin origin;
@ -71,7 +72,7 @@ public:
mutable uint32_t idx = std::numeric_limits<uint32_t>::max();
// Used for searching in PosTable::[].
explicit Origin(uint32_t idx): idx(idx), origin{Pos::stdin_tag()} {}
explicit Origin(uint32_t idx): idx(idx), origin{Pos::none_tag()} {}
public:
const Pos::Origin origin;