diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-27 16:57:34 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-02-27 16:57:34 +0200 |
commit | 4372f041bb7401c3adc2d5710566b13f64722102 (patch) | |
tree | 5f37f6e69e5529d3628b7611bb642dba15d885c0 /build/scope | |
parent | e1d2e3b63934c1e193429f1d6c4e04abc0e85d56 (diff) |
Variable assignment, appending support
Diffstat (limited to 'build/scope')
-rw-r--r-- | build/scope | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/build/scope b/build/scope index 6d96b0a..2746ff8 100644 --- a/build/scope +++ b/build/scope @@ -20,8 +20,17 @@ namespace build const path_type& path () const {return i_->first;} // Absolute and normalized. - scope& - parent () const {return *parent_;} + scope* + parent () const {return parent_;} + + // Variable lookup. + // + public: + value* + operator[] (const variable&); + + value* + operator[] (const std::string& name); private: friend class scope_map; @@ -45,7 +54,7 @@ namespace build scope* parent_; }; - class scope_map: path_map<scope> + class scope_map: public path_map<scope> { public: // Note that we assume the first insertion into the map is that |