aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build/script/parser.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/build/script/parser.cxx')
-rw-r--r--libbuild2/build/script/parser.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/libbuild2/build/script/parser.cxx b/libbuild2/build/script/parser.cxx
index 4bdf5c7..d26b155 100644
--- a/libbuild2/build/script/parser.cxx
+++ b/libbuild2/build/script/parser.cxx
@@ -95,14 +95,12 @@ namespace build2
// Check if we are trying to modify any of the special variables
// ($>).
//
- string& n (t.value);
+ if (t.value == ">")
+ fail (t) << "attempt to set '" << t.value << "' variable";
- if (n == ">")
- fail (t) << "attempt to set '" << n << "' variable";
-
- // Pre-enter the variable.
+ // We don't pre-enter variables.
//
- ln.var = &script_->var_pool.insert (move (n));
+ ln.var = nullptr;
next (t, tt); // Assignment kind.
@@ -317,7 +315,8 @@ namespace build2
exec_lines (s.lines.begin (), s.lines.end (),
exec_set, exec_cmd, exec_if,
- li);
+ li,
+ &environment_->var_pool);
runner_->leave (*environment_, s.end_loc);
}