equal
deleted
inserted
replaced
147 int symtable_c<value_type>::count(const std::string identifier_str) {return _base.count(identifier_str)+((inner_scope == NULL)?0:inner_scope->count(identifier_str));} |
147 int symtable_c<value_type>::count(const std::string identifier_str) {return _base.count(identifier_str)+((inner_scope == NULL)?0:inner_scope->count(identifier_str));} |
148 |
148 |
149 |
149 |
150 // in the operator[] we delegate to find(), since that method will also search in the inner scopes! |
150 // in the operator[] we delegate to find(), since that method will also search in the inner scopes! |
151 template<typename value_type> |
151 template<typename value_type> |
152 typename symtable_c<value_type>::value_t symtable_c<value_type>::operator[] (const char *identifier_str) {return find(identifier_str)->second;} |
152 typename symtable_c<value_type>::value_t& symtable_c<value_type>::operator[] (const char *identifier_str) {iterator i = find(identifier_str); return (i!=end())?i->second:_base[identifier_str];} |
153 template<typename value_type> |
153 template<typename value_type> |
154 typename symtable_c<value_type>::value_t symtable_c<value_type>::operator[] (const std::string identifier_str) {return find(identifier_str)->second;} |
154 typename symtable_c<value_type>::value_t& symtable_c<value_type>::operator[] (const std::string identifier_str) {iterator i = find(identifier_str); return (i!=end())?i->second:_base[identifier_str];} |
155 |
155 |
156 |
156 |
157 template<typename value_type> |
157 template<typename value_type> |
158 typename symtable_c<value_type>::iterator symtable_c<value_type>::end (void) {return _base.end ();} |
158 typename symtable_c<value_type>::iterator symtable_c<value_type>::end (void) {return _base.end ();} |
159 |
159 |