aboutsummaryrefslogtreecommitdiff
path: root/build2/test/script/parser.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-11-08 13:35:13 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-11-08 16:12:59 +0300
commit6e1f59670b7aaabb27830a345aad9532af111016 (patch)
tree8346d96f67244a99f6c945cb427cc13ea9299c73 /build2/test/script/parser.cxx
parentee49a8c2a3dbe88c625599a750c9219e3118b008 (diff)
Get rid of faulty test script move-ctor
Diffstat (limited to 'build2/test/script/parser.cxx')
-rw-r--r--build2/test/script/parser.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/build2/test/script/parser.cxx b/build2/test/script/parser.cxx
index de453e5..5902008 100644
--- a/build2/test/script/parser.cxx
+++ b/build2/test/script/parser.cxx
@@ -30,16 +30,16 @@ namespace build2
return !s.empty ();
}
- script parser::
- pre_parse (testscript& ts, target& tg, const dir_path& wd)
+ void parser::
+ pre_parse (script& s)
{
- const path& p (ts.path ());
+ const path& p (s.script_target.path ());
assert (!p.empty ()); // Should have been assigned.
try
{
ifdstream ifs (p);
- return pre_parse (ifs, ts, tg, wd);
+ pre_parse (ifs, s);
}
catch (const io_error& e)
{
@@ -48,11 +48,10 @@ namespace build2
}
}
- script parser::
- pre_parse (istream& is, testscript& ts, target& tg, const dir_path& wd)
+ void parser::
+ pre_parse (istream& is, script& s)
{
- script s (tg, ts, wd);
- path_ = &*s.paths_.insert (ts.path ()).first;
+ path_ = &*s.paths_.insert (s.script_target.path ()).first;
pre_parse_ = true;
@@ -83,8 +82,6 @@ namespace build2
fail (t) << "stray " << t;
group_->end_loc_ = get_location (t);
-
- return s;
}
void parser::