aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval-cache.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-06-29 19:08:37 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-06-29 19:08:37 +0200
commit50f13b06fb1b2f50a97323c000d1094d090f08ea (patch)
tree6b99e97ffc6bac40f67d1e83cec8e5eef68cc4a1 /src/libexpr/eval-cache.hh
parentb681408879c9ad1e500fa6e4566c6d119def4271 (diff)
EvalCache: Store string contexts
Diffstat (limited to 'src/libexpr/eval-cache.hh')
-rw-r--r--src/libexpr/eval-cache.hh14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/libexpr/eval-cache.hh b/src/libexpr/eval-cache.hh
index 30261fd3a..674bb03c1 100644
--- a/src/libexpr/eval-cache.hh
+++ b/src/libexpr/eval-cache.hh
@@ -50,7 +50,17 @@ struct misc_t {};
struct failed_t {};
typedef uint64_t AttrId;
typedef std::pair<AttrId, Symbol> AttrKey;
-typedef std::variant<std::vector<Symbol>, std::string, placeholder_t, missing_t, misc_t, failed_t, bool> AttrValue;
+typedef std::pair<std::string, std::vector<std::pair<Path, std::string>>> string_t;
+
+typedef std::variant<
+ std::vector<Symbol>,
+ string_t,
+ placeholder_t,
+ missing_t,
+ misc_t,
+ failed_t,
+ bool
+ > AttrValue;
class AttrCursor : public std::enable_shared_from_this<AttrCursor>
{
@@ -94,6 +104,8 @@ public:
std::string getString();
+ string_t getStringWithContext();
+
bool getBool();
std::vector<Symbol> getAttrs();