From 68f96f9213e849d0d7c4cedf3edeaec99743ee27 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 24 Aug 2015 09:51:15 +0200 Subject: New variable architecture --- build/scope | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'build/scope') diff --git a/build/scope b/build/scope index 6edb43a..50c4f6b 100644 --- a/build/scope +++ b/build/scope @@ -68,37 +68,37 @@ namespace build // Lookup, including in outer scopes. If you only want to lookup // in this scope, do it on the the variables map directly. // - value_proxy + lookup operator[] (const variable&) const; - value_proxy + lookup operator[] (const std::string& name) const { return operator[] (variable_pool.find (name)); } - // Return a value_proxy suitable for assignment (or append if you - // only want to append to the value from this scope). If the variable - // does not exist in this scope's map, then a new one with the NULL - // value is added and returned. Otherwise the existing value is - // returned. + // Return a value suitable for assignment (or append if you only + // want to append to the value from this scope). If the variable + // does not exist in this scope's map, then a new one with the + // NULL value is added and returned. Otherwise the existing value + // is returned. // - value_proxy - assign (const variable& var) {return vars.assign (var).first;} + value& + assign (const variable& var) {return vars.assign (var).first.get ();} - value_proxy - assign (const std::string& name) {return vars.assign (name).first;} + value& + assign (const std::string& name) {return vars.assign (name).first.get ();} - // Return a value_proxy suitable for appending. If the variable - // does not exist in this scope's map, then outer scopes are - // searched for the same variable. If found then a new variable - // with the found value is added to this scope and returned. - // Otherwise this function proceeds as assign(). + // Return a value suitable for appending. If the variable does not + // exist in this scope's map, then outer scopes are searched for + // the same variable. If found then a new variable with the found + // value is added to this scope and returned. Otherwise this + // function proceeds as assign(). // - value_proxy + value& append (const variable&); - value_proxy + value& append (const std::string& name) { return append (variable_pool.find (name)); -- cgit v1.1