aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/parser/parser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/parser/parser.cc')
-rw-r--r--src/libexpr/parser/parser.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libexpr/parser/parser.cc b/src/libexpr/parser/parser.cc
index b7a105fe7..68aa3ddc5 100644
--- a/src/libexpr/parser/parser.cc
+++ b/src/libexpr/parser/parser.cc
@@ -631,7 +631,7 @@ template<> struct BuildAST<grammar::expr::path> : p::maybe_nothing {};
template<> struct BuildAST<grammar::expr::uri> {
static void apply(const auto & in, ExprState & s, State & ps) {
- static bool noURLLiterals = experimentalFeatureSettings.isEnabled(Xp::NoUrlLiterals);
+ bool noURLLiterals = ps.xpSettings.isEnabled(Xp::NoUrlLiterals);
if (noURLLiterals)
throw ParseError({
.msg = HintFmt("URL literals are disabled"),
@@ -832,7 +832,8 @@ Expr * EvalState::parse(
size_t length,
Pos::Origin origin,
const SourcePath & basePath,
- std::shared_ptr<StaticEnv> & staticEnv)
+ std::shared_ptr<StaticEnv> & staticEnv,
+ const ExperimentalFeatureSettings & xpSettings)
{
parser::State s = {
symbols,
@@ -840,6 +841,7 @@ Expr * EvalState::parse(
basePath,
positions.addOrigin(origin, length),
exprSymbols,
+ xpSettings
};
parser::ExprState x;