aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build/script/parser.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-05-19 19:57:46 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2020-05-27 08:35:29 +0200
commit51ae6dcf64ce1de3f0f28228050c7db1776e5b1b (patch)
treee4dac1b667de57d56d8a831235fc3b04e3700031 /libbuild2/build/script/parser.cxx
parent52f3c1825660cbf9a5b39abbbbd04bc4f8172f69 (diff)
Remove redundant script member from build::script::environment class
Diffstat (limited to 'libbuild2/build/script/parser.cxx')
-rw-r--r--libbuild2/build/script/parser.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbuild2/build/script/parser.cxx b/libbuild2/build/script/parser.cxx
index c64bcd9..9c397f1 100644
--- a/libbuild2/build/script/parser.cxx
+++ b/libbuild2/build/script/parser.cxx
@@ -240,7 +240,7 @@ namespace build2
//
void parser::
- execute (environment& e, runner& r)
+ execute (const script& s, environment& e, runner& r)
{
path_ = nullptr; // Set by replays.
@@ -248,7 +248,7 @@ namespace build2
set_lexer (nullptr);
- script_ = nullptr;
+ script_ = const_cast<script*> (&s);
runner_ = &r;
environment_ = &e;
@@ -258,7 +258,7 @@ namespace build2
void parser::
exec_script ()
{
- const script& s (environment_->script);
+ const script& s (*script_);
runner_->enter (*environment_, s.start_loc);