aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-03-04 13:58:42 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-03-04 13:58:42 +0100
commit73b6d87e17bbe3c8612af2b9f369d92d3726efbe (patch)
tree8b2b9e76744746122fcea962dd9d98075061d0b0 /src/libexpr/eval.hh
parentf443d5ca19f07153af930686dd7aec44b88f16fd (diff)
parentd37dc71e3cf077fa5d24a9bf8395deae21cc4410 (diff)
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 167db9354..cc212258d 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -116,6 +116,9 @@ private:
/* Cache used by checkSourcePath(). */
std::unordered_map<Path, Path> resolvedPaths;
+ /* Cache used by prim_match(). */
+ std::unordered_map<std::string, std::regex> regexCache;
+
public:
EvalState(const Strings & _searchPath, ref<Store> store);
@@ -318,6 +321,7 @@ private:
friend struct ExprOpConcatLists;
friend struct ExprSelect;
friend void prim_getAttr(EvalState & state, const Pos & pos, Value * * args, Value & v);
+ friend void prim_match(EvalState & state, const Pos & pos, Value * * args, Value & v);
};