diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-10-16 10:41:59 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-04 09:26:21 +0200 |
commit | b9007109a1b6044f5b3239ccacc10946c94c46f4 (patch) | |
tree | dc47d05c21dd9684d7b7ab6f5756b775d3a75892 /build2/test/script/parser.cxx | |
parent | e6932f85e8b20876f66968b31f84488eee31153d (diff) |
Add notion of scope to testscript model
Diffstat (limited to 'build2/test/script/parser.cxx')
-rw-r--r-- | build2/test/script/parser.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/build2/test/script/parser.cxx b/build2/test/script/parser.cxx index 57068c6..7d234eb 100644 --- a/build2/test/script/parser.cxx +++ b/build2/test/script/parser.cxx @@ -28,6 +28,7 @@ namespace build2 script_ = &s; runner_ = &r; + scope_ = script_; token t; type tt; @@ -118,8 +119,8 @@ namespace build2 fail (t) << "unexpected " << t; value& lhs (kind == type::assign - ? script_->assign (var) - : script_->append (var)); + ? scope_->assign (var) + : scope_->append (var)); // @@ Need to adjust to make strings the default type. // @@ -604,7 +605,7 @@ namespace build2 fail (l) << "qualified variable name"; const variable& var (script_->var_pool.insert (move (name))); - return script_->find (var); + return scope_->find (var); } } } |