diff options
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r-- | src/libexpr/eval.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 35b09f4d5..2a6a89ddb 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -17,6 +17,7 @@ #include "gc-small-vector.hh" #include "fetch-to-store.hh" #include "flake/flakeref.hh" +#include "parser-tab.hh" #include <algorithm> #include <chrono> @@ -2806,6 +2807,22 @@ std::optional<std::string> EvalState::resolveSearchPathPath(const SearchPath::Pa return res; } + +Expr * EvalState::parse( + char * text, + size_t length, + Pos::Origin origin, + const SourcePath & basePath, + std::shared_ptr<StaticEnv> & staticEnv) +{ + auto result = parseExprFromBuf(text, length, origin, basePath, symbols, positions); + + result->bindVars(*this, staticEnv); + + return result; +} + + std::string ExternalValueBase::coerceToString(const Pos & pos, NixStringContext & context, bool copyMore, bool copyToStore) const { throw TypeError({ |