aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build/script/parser.test.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-10-10 18:22:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-10-10 18:22:31 +0200
commit19af3f6b0873a92582e4787a87a6f14df53ff6ae (patch)
tree7545e80d9348eb7808e1c894cd111ab46cc8a9a5 /libbuild2/build/script/parser.test.cxx
parent9f95a23eae04680559a9cb943fdfaa00f52cd66e (diff)
Preparatory work for public/private variable distinction
We still always use the public var_pool from context but where required, all access now goes through scope::var_pool().
Diffstat (limited to 'libbuild2/build/script/parser.test.cxx')
-rw-r--r--libbuild2/build/script/parser.test.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/libbuild2/build/script/parser.test.cxx b/libbuild2/build/script/parser.test.cxx
index f8c2696..061f3f8 100644
--- a/libbuild2/build/script/parser.test.cxx
+++ b/libbuild2/build/script/parser.test.cxx
@@ -232,6 +232,8 @@ namespace build2
tt.path (path ("driver"));
+ const scope& bs (tt.base_scope ());
+
small_vector<action, 1> acts {perform_update_id};
// Parse and run.
@@ -239,7 +241,7 @@ namespace build2
parser p (ctx);
path_name nm ("buildfile");
- script s (p.pre_parse (tt.base_scope (), tt.type (), acts,
+ script s (p.pre_parse (bs, tt.type (), acts,
cin, nm,
11 /* line */,
(m != mode::diag
@@ -251,7 +253,7 @@ namespace build2
{
case mode::run:
{
- environment e (perform_update_id, tt, s.body_temp_dir);
+ environment e (perform_update_id, tt, bs, s.body_temp_dir);
print_runner r (print_line, print_iterations);
p.execute_body (ctx.global_scope, ctx.global_scope, e, s, r);
break;
@@ -266,7 +268,7 @@ namespace build2
{
assert (s.diag_line);
- environment e (perform_update_id, tt, false /* temp_dir */);
+ environment e (perform_update_id, tt, bs, false /* temp_dir */);
cout << "diag: " << p.execute_special (ctx.global_scope,
ctx.global_scope,