From c9b0a85b088b472eda9818dfaa0cc1a54124933c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 13 Dec 2022 16:00:44 +0100 Subject: Restore display of source lines for stdin/string inputs --- src/libexpr/nixexpr.hh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/libexpr/nixexpr.hh') diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh index 0338a8c37..ac7ce021e 100644 --- a/src/libexpr/nixexpr.hh +++ b/src/libexpr/nixexpr.hh @@ -28,10 +28,11 @@ struct Pos uint32_t line; uint32_t column; - struct stdin_tag {}; - struct string_tag {}; + struct none_tag { }; + struct Stdin { ref source; }; + struct String { ref source; }; - typedef std::variant Origin; + typedef std::variant Origin; Origin origin; @@ -72,7 +73,7 @@ public: mutable uint32_t idx = std::numeric_limits::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; -- cgit v1.2.3