aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/nixexpr.hh
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2022-03-05 17:31:50 +0100
committerpennae <github@quasiparticle.net>2022-04-21 21:46:10 +0200
commit00a32802328b58daa7af48ccac60f6154ef05639 (patch)
treeec5b2bd1dc10f15f4e60713a50445675b77c5180 /src/libexpr/nixexpr.hh
parent6526d1676ba5a645f65d751e7529ccd273579017 (diff)
don't use Symbol in Pos to represent a path
PosTable deduplicates origin information, so using symbols for paths is no longer necessary. moving away from path Symbols also reduces the usage of symbols for things that are not keys in attribute sets, which will become important in the future when we turn symbols into indices as well.
Diffstat (limited to 'src/libexpr/nixexpr.hh')
-rw-r--r--src/libexpr/nixexpr.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh
index d9392cff5..2e12f0b4f 100644
--- a/src/libexpr/nixexpr.hh
+++ b/src/libexpr/nixexpr.hh
@@ -26,7 +26,7 @@ MakeError(RestrictedPathError, Error);
struct Pos
{
- Symbol file;
+ std::string file;
FileOrigin origin;
uint32_t line;
uint32_t column;
@@ -64,10 +64,10 @@ public:
explicit Origin(uint32_t idx): idx(idx), file{}, origin{} {}
public:
- const Symbol file;
+ const std::string file;
const FileOrigin origin;
- Origin(Symbol file, FileOrigin origin): file(file), origin(origin) {}
+ Origin(std::string file, FileOrigin origin): file(std::move(file)), origin(origin) {}
};
struct Offset {