From 4372f041bb7401c3adc2d5710566b13f64722102 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 27 Feb 2015 16:57:34 +0200 Subject: Variable assignment, appending support --- build/scope | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'build/scope') 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 + class scope_map: public path_map { public: // Note that we assume the first insertion into the map is that -- cgit v1.1